Help with a couple of events

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Lunaticus_matrixforum
Posts: 834
Joined: Wed Dec 31, 2008 3:50 pm
Location: Germany

RE: Help with a couple of events

Post 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....
Grymme
Posts: 1776
Joined: Sun Dec 16, 2007 5:06 pm
Contact:

RE: Help with a couple of events

Post 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
My Advanced Tactics Mod page
http://atgscenarios.wordpress.com

30+ scenarios, maps and mods for AT and AT:G
Grymme
Posts: 1776
Joined: Sun Dec 16, 2007 5:06 pm
Contact:

RE: Help with a couple of events

Post 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.
My Advanced Tactics Mod page
http://atgscenarios.wordpress.com

30+ scenarios, maps and mods for AT and AT:G
Lunaticus_matrixforum
Posts: 834
Joined: Wed Dec 31, 2008 3:50 pm
Location: Germany

RE: Help with a couple of events

Post 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
Grymme
Posts: 1776
Joined: Sun Dec 16, 2007 5:06 pm
Contact:

RE: Help with a couple of events

Post 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.
My Advanced Tactics Mod page
http://atgscenarios.wordpress.com

30+ scenarios, maps and mods for AT and AT:G
Grymme
Posts: 1776
Joined: Sun Dec 16, 2007 5:06 pm
Contact:

RE: Help with a couple of events

Post by Grymme »

opium event seem to work also.
My Advanced Tactics Mod page
http://atgscenarios.wordpress.com

30+ scenarios, maps and mods for AT and AT:G
User avatar
Barthheart
Posts: 3080
Joined: Tue Jul 20, 2004 3:16 pm
Location: Nepean, Ontario

RE: Help with a couple of events

Post by Barthheart »

Errr... umm.... since you are now getting paid for this scenario ().... do Lunaticus and I get a cut for helping out?
Life is not a journey to the grave with the intention of arriving safely in a pretty & well preserved body,
but rather to skid in broadside, totally worn out & proclaiming "WOW, what a ride!"
Grymme
Posts: 1776
Joined: Sun Dec 16, 2007 5:06 pm
Contact:

RE: Help with a couple of events

Post 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.
My Advanced Tactics Mod page
http://atgscenarios.wordpress.com

30+ scenarios, maps and mods for AT and AT:G
User avatar
Jeffrey H.
Posts: 3154
Joined: Fri Apr 13, 2007 6:39 pm
Location: San Diego, Ca.

RE: Help with a couple of events

Post 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.

History began July 4th, 1776. Anything before that was a mistake.

Ron Swanson
Grymme
Posts: 1776
Joined: Sun Dec 16, 2007 5:06 pm
Contact:

RE: Help with a couple of events

Post 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 :)
My Advanced Tactics Mod page
http://atgscenarios.wordpress.com

30+ scenarios, maps and mods for AT and AT:G
Post Reply

Return to “Mods and Scenarios”