Conquer Club

XML Q: autodeploys

Topics that are not maps. Discuss general map making concepts, techniques, contests, etc, here.

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

XML Q: autodeploys

Postby natty dread on Wed Aug 25, 2010 6:49 am

Is there a limit to positive/negative autodeploys?

ie. what type is the autodeploy variable... I would assume it to be an int32, but idk...

I just thought it'd be neat to make a different kind of "killer" territories, ones which will in practice always leave you just 1 troop on the territory... so you can theoretically hold them but can't stack any troops on them.

So to make this work within a reasonable scale (I've seen games with 10:s of thousands of troops) the decay should be set somewhere around -100000. Will it work?
Image
User avatar
Sergeant 1st Class natty dread
 
Posts: 12877
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

Re: XML Q: autodeploys

Postby ender516 on Thu Aug 26, 2010 9:55 am

Clever idea. If they are in fact int32, then you want -2147483648, which will reduce any positive number to a negative value, which would presumably be converted to a 1. Knowing the actual code would help avoid weird occurrences (underflows and whatnot). For example, if the code ever negates this value, it will still be the same! So, if the code checks for a negative autodeploy, then negates it to check if it is larger than the current troop value before trying to subtract it, things could get quite weird. If it simply adds the autodeploy, positive or negative, then checks for a value less than one which would be restored to one, then everything is kosher.
User avatar
Sergeant 1st Class ender516
 
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Location: Waterloo, Ontario


Return to Foundry Discussions

Who is online

Users browsing this forum: No registered users