Page 2 of 2
RE: Help with a couple of events
Posted: Sun Apr 12, 2009 7:14 pm
by Lunaticus_matrixforum
Yes. Actually line 2 is wrong. It should read checkslot (tempvar1, tempvar2,1) = 1
Also your coding will run much faster if you take line 3 out of the loops. I.e. bring line 1 to the beginning of the code and bring the corresponding check to the end.
Btw it makes things easier to discuss if you post the code in text format....
RE: Help with a couple of events
Posted: Sun Apr 12, 2009 8:02 pm
by Grymme
Changed it, tested it. Still doesnt work. Here is the event in current code. I am suspicious of line 6.
0) CHECK: CheckSFTypeInArea(1, 2, 96, 1) > CheckSFTypeInArea(1, 2, 95, 0)
1) LOOPER: TempVar1 FROM 0 TO CheckMapWidth
2) LOOPER: TempVar2 FROM 0 TO CheckMapHeight
3) CHECK: CheckSlot(TempVar1, TempVar2, 1) == 2
4) CHECK: CheckHexOwner(TempVar1, TempVar2) == 0
5) EXECUTE: ExecSetSlot(TempVar1, TempVar2, 9, 1)
6) CHECK: CheckUnitsFrom(9, 1, 0, 1) > 0
7) EXECUTE: ExecReadinessLossByArea(9, 1, 100, 100)
8) END CHECK
9) EXECUTE: ExecSetSlot(TempVar1, TempVar2, 9, 0)
10) END CHECK
11) END LOOPER
12) END LOOPER
13) END CHECK
RE: Help with a couple of events
Posted: Sun Apr 12, 2009 8:05 pm
by Grymme
Btw. Any clues to make the coding go smother is very much apreciated. The scenario currently takes around7-8 minutes to load without AI. And that is with the current 78 events. Adding another 20 (which this might do) could make it longer. I am convinced that a lot of my coding could be done in loops and generally faster. Just dont have the skill.
RE: Help with a couple of events
Posted: Sun Apr 12, 2009 9:50 pm
by Lunaticus_matrixforum
You have one EndCheck missing (number of Endchecks must always match to checks, similar with Loops). Try:
0) CHECK: CheckSFTypeInArea(1, 2, 96, 1) > CheckSFTypeInArea(1, 2, 95, 0)
1) LOOPER: TempVar1 FROM 0 TO CheckMapWidth
2) LOOPER: TempVar2 FROM 0 TO CheckMapHeight
3) CHECK: CheckSlot(TempVar1, TempVar2, 1) == 2
4) CHECK: CheckHexOwner(TempVar1, TempVar2) == 0
5) EXECUTE: ExecSetSlot(TempVar1, TempVar2, 9, 1)
6) CHECK: CheckUnitsFrom(9, 1, 0, 1) > 0
7) EXECUTE: ExecReadinessLossByArea(9, 1, 100, 100)
8) END CHECK
9) EXECUTE: ExecSetSlot(TempVar1, TempVar2, 9, 0)
10) END CHECK
11 END CHECK
12) END LOOPER
13) END LOOPER
14) END CHECK
The rest depends on your settings.
Soviet= Regime 0
Russian=Peoplenr 1
Province to be checked = Slot 1 Value 2
RE: Help with a couple of events
Posted: Mon Apr 13, 2009 8:35 am
by Grymme
Hi Lunaticus. It seems to work now, with the quirk that USSR units camping with non russian units are also affected. While this is not intentional i think it can be rationalized. Russsian troops stationed with DRÁ units are also effected because of cohabitating with the DRA troops.
Also i made a separate event that checks if each province is activated so instead of having 20 more round checks it only checks the ones that are actually activaded (to save computer time). This bad boy actually has 97 events

Its starting to come together now.
Lunaticus and Barthhead. Thanks for your patience.
RE: Help with a couple of events
Posted: Mon Apr 13, 2009 8:45 am
by Grymme
opium event seem to work also.
RE: Help with a couple of events
Posted: Tue Apr 14, 2009 1:17 pm
by Barthheart
Errr... umm.... since you are now getting
paid for this scenario (

).... do Lunaticus and I get a cut for helping out?

RE: Help with a couple of events
Posted: Tue Apr 14, 2009 1:24 pm
by Grymme
Lol. Well, someone pretty much have to pay for it first

i have been thinking about it a lot and i basicly spend 100s of hours and a lot of money on scenariodesigning, so it would be nice if i could get at least a token reward for it (1-3$/scenario or something like that). Thats why i am going down that road. Dont expect many people do be interested, but that doesnt bother me much.
Cant see why people would be pissed of by this. If they are not ready to pay the equivilent of a BigMac for something that i spent 4 months doing i will just leave them alone.
I will most likely be releasing more free material anyway, and updating the half dussin scenarios i already uploaded for free.
RE: Help with a couple of events
Posted: Tue Apr 14, 2009 2:37 pm
by Jeffrey H.
I'm not sure how it fits into the terms of service with the forums or with the EULA of AT.
I don't disagree with your position, in fact I think it's a potentially positive development for user generated content in AT. Better motivation to do better things.
RE: Help with a couple of events
Posted: Tue Apr 14, 2009 2:41 pm
by Grymme
I am not certain myself how it fits with the forum terms. Thats why i tried to keep it low key. If Matrix games want me to change my signature i will of course comply. I have consulted people before doing this, but i dont really want to take that discussion here.
Jeffrey: thats another reason for doing it, believe it or not. To see how good a scenario i could do
