Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Editing 102 - Events

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios >> Editing 102 - Events Page: [1]
Login
Message << Older Topic   Newer Topic >>
Editing 102 - Events - 4/28/2011 7:09:20 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

Making progress but a few of my events are becoming quite long.

Is there any way of calling one event from another so I can break them down into smaller modules?

Cheers,
Lancer
Post #: 1
RE: Editing 102 - Events - 4/28/2011 7:21:22 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

O.K, answered my own question.

I can do this with ExecExecuteEvent and pass data via Game or Regime variables.

The editor, despite it's funky interface, appears to have a fair amount of grunt and functionality built in.

Can anyone tell me what 'Early Turn (no unter)' means? I've got the Early turn event bit but the 'no unter' is a mystery. 'Under' in german? 'Sausage' in Dutch?

Cheers,
Lancer

(in reply to lancer)
Post #: 2
RE: Editing 102 - Events - 4/28/2011 9:33:33 AM   
Vic


Posts: 8262
Joined: 5/17/2004
Status: offline
'unter' is a feature that actually did not make it into ATG... dont worry about it...

and checkout this wiki page for the order of event processing:
http://www.vrdesigns.nl/atwiki/doku.php?id=game_loop_screen

ps: there is also the CallFunction which has more functionality then ExecExecut and can be called by name... so calls dont get broken by switching or deleting events.

best regards,
Vic


_____________________________

Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics


(in reply to lancer)
Post #: 3
RE: Editing 102 - Events - 4/28/2011 9:43:45 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day Vic,

Thanks for the info and the tip.

I'm enjoying ATG. Good job.

Cheers,
Lancer

(in reply to Vic)
Post #: 4
RE: Editing 102 - Events - 4/29/2011 9:18:19 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

A couple of quick questions.

If all the variables (temp / game / regime) are integers how do I deal with percentages?

Eg. I want multiply one variable by a percentage - which I can do if it's a set percentage (eg. always 0.55) but not if it's a variable percentage (eg. I want to store the value in a variable and multiply by, say, tempvar2).

With regards to the standard integer variables what is the upper (and negative lower) limits for the numbers, eg. +/- 64,000 ?

Cheers,
Lancer

(in reply to lancer)
Post #: 5
RE: Editing 102 - Events - 4/29/2011 9:35:53 AM   
Vic


Posts: 8262
Joined: 5/17/2004
Status: offline
integers are maximum 2,147,483,647 + or -

to deal with percentages you have to first multiply by the percentage in question and then divide by 100.

best regards,
Vic


_____________________________

Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics


(in reply to lancer)
Post #: 6
RE: Editing 102 - Events - 4/29/2011 10:47:38 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day Vic,

O.K, thanks.

Cheers,
Lancer

(in reply to Vic)
Post #: 7
RE: Editing 102 - Events - 4/30/2011 3:54:38 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

Moving along. How do I place data on the top bar of the GUI?

Eg. in the normal games there are a small boxes tracking Political Points, Raw and Oil.

I've noticed in other scenarios that you can add boxes to track custom data (regime vars only?) which is what I'd like to do.

Haven't managed to find any information on how to do this so any help would be appreciated.

Cheers,
Lancer

(in reply to lancer)
Post #: 8
RE: Editing 102 - Events - 5/1/2011 3:50:19 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline
The resource bar is showing the regime variables.  Go into editor, settings, regime variables on a random game and look at how raw and oil are set.

(in reply to lancer)
Post #: 9
RE: Editing 102 - Events - 5/2/2011 7:47:26 AM   
lion_of_judah


Posts: 2113
Joined: 1/8/2007
Status: offline
how does one do weather events for say an area like Indochina and Southern Africa.....

(in reply to lancer)
Post #: 10
RE: Editing 102 - Events - 5/2/2011 7:59:13 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day Tweber,

Got it. Thanks. Looked at that before but didn't put it together. Probably suffering from button overload syndrome.

For anyone following my erratic path through editor-land here's a bit more information.

~ ~ ~

As mentioned above you need to set up a regime variable that holds the data. This is, of course, after you've already entered the editor and pressed the 'Setting' button to arrive at a screen that looks like this...





Once that's done you get to see your vital stats in-game as shown below.





As 'Unrest' isn't a resource that is generated by an in-game structure, I assuming that the yellow indicator will always read zip.





Initialising and updating your regime variable can be done through events. Best done using the editors inbuilt EXEC's. Here's a test event snippet that adds a random amount to 'Unrest' every turn and updates the regime variable.





Cheers,
Lancer

< Message edited by lancer -- 5/2/2011 8:01:41 AM >

(in reply to tweber)
Post #: 11
RE: Editing 102 - Events - 5/2/2011 8:44:41 PM   
tweber

 

Posts: 1411
Joined: 6/27/2007
Status: offline

quote:

ORIGINAL: lion_of_judah

how does one do weather events for say an area like Indochina and Southern Africa.....


Typical way is to define a new land type for each weather - Land type 1 could be plains, Land type 1 + x could be snow plains, Land type 1 + 2x could be mud plains. Based on the time of year, you change the land types. Does this make sense?

(in reply to lion_of_judah)
Post #: 12
RE: Editing 102 - Events - 5/2/2011 9:53:06 PM   
lion_of_judah


Posts: 2113
Joined: 1/8/2007
Status: offline

quote:

ORIGINAL: tweber


quote:

ORIGINAL: lion_of_judah

how does one do weather events for say an area like Indochina and Southern Africa.....


Typical way is to define a new land type for each weather - Land type 1 could be plains, Land type 1 + x could be snow plains, Land type 1 + 2x could be mud plains. Based on the time of year, you change the land types. Does this make sense?


Somewhat, thanks

(in reply to tweber)
Post #: 13
RE: Editing 102 - Events - 5/3/2011 11:12:11 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

Back again.

I have run into a small technical problem that has, despite my best efforts, beaten me.

I have written the event below which kicks in at the start of a random game. Nothing complicated, it finds the player's HQ and adds a few trucks.





When I run the event in a bog standard two player random game and the human is the default regime 0 then it works fine. However when I repeat with a similiar game but make the human regime 1 it strangely doesn't work.

I say strangely 'cause I can copy the event (identical copy using the editors inbuilt paste function) and change it so it kicks in on round 1 instead of right at the start. Surprisingly the event now works for both instances of the player (regime 0 or 1).

So why doesn't it work normally when the player selects regime 1 instead of 0?

I have piggybacked the event (line #8) along with all the other standard random game master file stuff as below.





Any help would be appreciated.

Cheers,
Lancer

(in reply to lion_of_judah)
Post #: 14
RE: Editing 102 - Events - 5/3/2011 1:42:46 PM   
Tufkal2

 

Posts: 834
Joined: 12/31/2008
From: Germany
Status: offline
Mmh this looks as if it should work (if predef #4 is assigned etc). Maybe you can post the file somewhere?

_____________________________


(in reply to lancer)
Post #: 15
RE: Editing 102 - Events - 5/3/2011 3:00:31 PM   
ernieschwitz

 

Posts: 3893
Joined: 9/15/2009
From: Denmark
Status: offline
Why did you put a block event at the end. I think that might be the trouble... Especially if this is an event called only once each players turn.

EDIT: I take that back, i don´t think that is the problem.

< Message edited by ernieschwitz -- 5/3/2011 3:05:48 PM >

(in reply to Tufkal2)
Post #: 16
RE: Editing 102 - Events - 5/3/2011 3:34:21 PM   
Vic


Posts: 8262
Joined: 5/17/2004
Status: offline
@lancer,

you might want to add a check to make sure tempvar3 > -1 just in case there is any neutral territory on the map.

need the actual file to give any more info on whats wrong

best,
vic


_____________________________

Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics


(in reply to ernieschwitz)
Post #: 17
RE: Editing 102 - Events - 5/4/2011 2:43:43 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

Tweaked the event to check for nuetral capitals. None present. Verified this by checking a few randomly generated maps in the editor. Not the problem.

Removed the Block Event at the end. Not the problem.





As mentioned above if I run the event as a 'round 1' event then it works fine, regardless of whether the human player is regime 0 or 1. Here's the test event doing this which is a carbon copy of the original event with only the round check added and a different unit placed on the map (so I can tell if it worked).





Interestingly I put three debug messages in the test event above and when I run it with human = regime 0 the messages all appear yet when I run it as human = regime 1 then none of the messages show, despite the event working as intended (But it still won't work when it is run as part of the random game set-up routine).

Something strange happening with the round processing when the human player isn't the default '0' regime. Haven't changed any of the ATG random game rulevars or done anything else that may effect it to the best of my (limited) knowledge.

Can I strap my file to the nearest pigeon and heave it out the window? Might have to feed it some of those special red pills. Long ways to fly.

Cheers,
Lancer


(in reply to Vic)
Post #: 18
RE: Editing 102 - Events - 5/4/2011 9:36:19 AM   
Vic


Posts: 8262
Joined: 5/17/2004
Status: offline
@lancer,

send your scenario to vic@xs4all.nl

i'll take a look. it might be a bug.

best,
Vic


_____________________________

Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics


(in reply to lancer)
Post #: 19
RE: Editing 102 - Events - 5/4/2011 10:47:14 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day Vic,

O.K, will do.

Thanks.

Cheers,
Lancer

(in reply to Vic)
Post #: 20
RE: Editing 102 - Events - 5/4/2011 8:03:43 PM   
Jeffrey H.


Posts: 3154
Joined: 4/13/2007
From: San Diego, Ca.
Status: offline

quote:

ORIGINAL: lancer

Something strange happening with the round processing when the human player isn't the default '0' regime. Haven't changed any of the ATG random game rulevars or done anything else that may effect it to the best of my (limited) knowledge.



The first random game I started in ATG, I moved the human regime from it's default position to the last regime in sequence and some very strange things happened. The game really didn't "go". I had shroud on and a few other items selected.

Something's fishy, IMO, and it's not related to your event directly.



_____________________________

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

Ron Swanson

(in reply to lancer)
Post #: 21
RE: Editing 102 - Events - 5/6/2011 10:57:24 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

For anyone reading this thread I should state for the record that the problem turned out to be operator error and that there is no particular game bug with what I've highlighted above.

Cheers,
Lancer

(in reply to Jeffrey H.)
Post #: 22
RE: Editing 102 - Events - 10/1/2011 2:56:17 PM   
bwheatley

 

Posts: 3650
Joined: 12/13/2004
Status: offline
what was the problem lancer?

_____________________________

-Alpha Tester Carrier Force
-Beta Tester ATG
- Mod Maintainer (past) for ATG's WAW mod
- Mod Maintainer (past) for ATG's GPW mod
-Beta Tester WITE
-Alpha Tester WITW
-Alpha Tester WITE2
-Alpha Tester Wif
-Beta Tester Command

(in reply to lancer)
Post #: 23
RE: Editing 102 - Events - 10/2/2011 11:02:47 PM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

From memory the problem wasn't with the code but was with me getting all tangled up over how to handle random game masterfiles.

I was using previously saved games for testing when I thought I was using newly generated ones.

Once I was sorted on that it all fell into place.

Cheers,
Lancer

(in reply to bwheatley)
Post #: 24
RE: Editing 102 - Events - 10/3/2011 12:59:46 AM   
bwheatley

 

Posts: 3650
Joined: 12/13/2004
Status: offline
Cool thanks. I'm back into editing again so any tips and tricks i can remember will help me. I really like the new stringlist stuff. It cut down one of my functions from 100 lines to 11 and a stringlist :)

_____________________________

-Alpha Tester Carrier Force
-Beta Tester ATG
- Mod Maintainer (past) for ATG's WAW mod
- Mod Maintainer (past) for ATG's GPW mod
-Beta Tester WITE
-Alpha Tester WITW
-Alpha Tester WITE2
-Alpha Tester Wif
-Beta Tester Command

(in reply to lancer)
Post #: 25
RE: Editing 102 - Events - 10/4/2011 12:14:47 AM   
lancer

 

Posts: 2963
Joined: 10/18/2005
Status: offline
G'day,

Yep, stringlists are your friend.

Don't forget that the first record in a stringlist is record '0', not record '1'.

Also if you start dynamically adding or subtracting records from a stringlist you need to make sure you are accessing the right record.

Something like this... (stringlist ID89)

Exec: ExecAddStringListCells(89,1,0)
SetVar: TempVar5 = CheckStringListRows(89)

then use TempVar5 as your row index, eg.

Exec: ExecSetStringList(89,TempVar5,...,...)

Cheers,
Lancer

(in reply to bwheatley)
Post #: 26
RE: Editing 102 - Events - 10/4/2011 1:43:55 AM   
bwheatley

 

Posts: 3650
Joined: 12/13/2004
Status: offline
Yea used to 0 being the primary id from programming shiz.
Thought i had just run into a loop issue but it was because i had a loop in a loop and goofed up the logic lol. Oops


_____________________________

-Alpha Tester Carrier Force
-Beta Tester ATG
- Mod Maintainer (past) for ATG's WAW mod
- Mod Maintainer (past) for ATG's GPW mod
-Beta Tester WITE
-Alpha Tester WITW
-Alpha Tester WITE2
-Alpha Tester Wif
-Beta Tester Command

(in reply to lancer)
Post #: 27
RE: Editing 102 - Events - 10/4/2011 2:15:08 AM   
bwheatley

 

Posts: 3650
Joined: 12/13/2004
Status: offline
Wonder if there is a size limit for the strings i was trying to make a string 241 by 85 and it crashes out on me :'(


_____________________________

-Alpha Tester Carrier Force
-Beta Tester ATG
- Mod Maintainer (past) for ATG's WAW mod
- Mod Maintainer (past) for ATG's GPW mod
-Beta Tester WITE
-Alpha Tester WITW
-Alpha Tester WITE2
-Alpha Tester Wif
-Beta Tester Command

(in reply to bwheatley)
Post #: 28
RE: Editing 102 - Events - 10/4/2011 2:25:16 AM   
bwheatley

 

Posts: 3650
Joined: 12/13/2004
Status: offline
Looks like there is a limit that is not documented on creating a string.




Attachment (1)

_____________________________

-Alpha Tester Carrier Force
-Beta Tester ATG
- Mod Maintainer (past) for ATG's WAW mod
- Mod Maintainer (past) for ATG's GPW mod
-Beta Tester WITE
-Alpha Tester WITW
-Alpha Tester WITE2
-Alpha Tester Wif
-Beta Tester Command

(in reply to bwheatley)
Post #: 29
RE: Editing 102 - Events - 10/4/2011 5:30:05 AM   
bwheatley

 

Posts: 3650
Joined: 12/13/2004
Status: offline
Also i noticed if you click on the last column of a stringlist it does that error too.

_____________________________

-Alpha Tester Carrier Force
-Beta Tester ATG
- Mod Maintainer (past) for ATG's WAW mod
- Mod Maintainer (past) for ATG's GPW mod
-Beta Tester WITE
-Alpha Tester WITW
-Alpha Tester WITE2
-Alpha Tester Wif
-Beta Tester Command

(in reply to bwheatley)
Post #: 30
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios >> Editing 102 - Events Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

4.625