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.
Post Reply
User avatar
natty dread
Posts: 12876
Joined: Fri Feb 08, 2008 8:58 pm
Location: just plain fucked

XML Q: autodeploys

Post by natty dread »

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
ender516
Posts: 4455
Joined: Wed Dec 17, 2008 6:07 pm
Gender: Male
Location: Waterloo, Ontario

Re: XML Q: autodeploys

Post by ender516 »

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

Return to “Foundry Discussions”