placement/removeUnits Question
-
Is there a way to have the new units active the turn they show up ? They show up on combat move, which I believe is hard coded, but they won't move until next turn. I've tried several things and did a lot of searching but no luck.
Also can -reset- reset more than one thing at a time. E.g. airfield gives movement to 3 units. I can reset where one gets adjusted movement, but the other two get no extra movement at all. Tried multiple triggers and adding them all into one and any other combination I could think of. No go.
I assume the -reset- resets count="-reset-X:X" only ? That would now become the only,in this case, givesMovement attached ?
FYI the Subject Title is hard to read
-
Placed units are active when they placed from whatever tech they receive then turn ends.
Are u meaning make bid units active? -
what I have is a tech that places new units. The tech activates at begining of turn. The units are placed at the start of combat move, but you can't move them until the next combat move.
From POS2
placement
values: places units at beginning of combat movement phase. first in list is territory to be placed it, then list of units, then count.
"placement" will be affected by "each" in a condition statement.
(example: value="Moscow:artillery:infantry" count="2" [if count is missing, defaults to 1]) -
correct
only way to get around that is tech firing with triggers at placement
-
well...I've been trying some stuff but... Not quite following prastle. The tech is what activates the placement. So not really sure what to do here. Do I need another tech that gives the new units movement ? Would have to be different than other units already on the board. Which could be done. Then have it deactivate after that turn ?
-
0_1487649610975_WW2v3-1941-techadvance.xml
have a look at this xml old lobby 1.8 might help
-
Thank You. I finally figured out reset. So now I just need to try and figure out how to change the unitAttachment with a trigger.
I've started keeping track of all things I can't figure out easily. I'll post it when I get a few. Also keeping track of things that aren't in POS2. Maybe people will add to it as well. Help out uneducated people like myself maybe.
I'll check out the xml. Thanks againwow! that's a lot of emojis ! didn't see the big tooth grin though
-
He was trigger happy in this one but its basically every v3 41 map ever made and then some in 1 dl..
-
@beelee sorry i should have said tech firing at bid placement
-
@prastle
Right on I'll give it a shot. Got most of the stuff working now. Cernel's xml was a big help. I didn't know how to change unitAttachments. A lot easier than adding a new unit.Doesn't look as if "givesMovement" is stackable ? At least it din't work when I tried it.
Thanks again for your help -
@beelee Sounds like you are making an interesting XML. I have also been wanting to give units movement when they get placed, but never figured out how. Nice if you have.
What is ”Cernel's xml”? And what is your “Also keeping track of things that aren't in POS2” thing? Are you making like a list of good tricks?
It would be nice to have a real “XML code guide” one day, with examples of possibilities and options that folks have figured out.
-
@Frostion
Cernel's xml is a few posts above. I never knew how to change unit attachments. There's a few that you can add to tech abilities, but I always would make a new unit and replace the old one. Cernel's was the first time I saw an example of unitAttachmentName I think it is, so I could just change the unitAttachment instead for most stuff. I think if I have the tech that places the new unit fire at bid phase, then maybe they'll work when the game starts. At least I think thats what prastle meant. Haven't tried it yet. Idk how that'd work after the game started though. I know there's a way to turn off certain delegates so you can skip things but I haven't quite figured that out yet.Anyway I think it's all in POS2 and Veqryn did provide some nice examples of stuff. There's a few that are hard for me to grasp though. Basically I look at what others have done, yourself, Zim Zero, Rolf and others and copy it. crazy_german's posts are always informative and several others I can't think of right now.
So I don't think I've actually found anything new yet. Some stuff is just worded differently. I would always see the changes when a new triplea came out, but didn't know how to use them. maybe there just kinda built in to what's already there. Idk.
But yea I was thinking it'd be cool to have a list of "good tricks" or something like that. There's a lot of info out there it's just hard to find.
so far the givesMovement thing hasn't worked quite the way I'd like. I made a bomber an airfield and had it give movement to a fighter. Which works, but if it's in a TTy that already has an airfield and their movement bonus is the same it won't stack. If it's higher, then it'll override the lower bonus and work. I don't think the engine can do that though.
-
@Frostion
So what's been working for getting the units to move when they're first placed is to have them place on the player's turn before the player who receives the units turn.I was always just doing the default where they were placed on your combat move and then they wouldn't do anything. So use the same trigger just set when so it fires the player before. I'm not sure if you can have it fire at the end of there turn and still work (haven't tried it) but any time before their combat move has been working.
-
I designed conditions and a trigger:
<attachment name="triggerSpaintoPro-Axis" attachTo="Pro-Axis" javaClass="TriggerAttachment" type="player">
<option name="when" value="after:Pro-AlliesCombatMove"/>
<option name="conditions" value="conditionAttachmentalliedbattlespain:conditionAttachmentobjectiveG4cn"/>
<option name="removeUnits" value="Spain:all"/>
<option name="changeOwnership" value="Spain:any:Pro-Axis:false"/>
<option name="placement" value="Spain:pa_infantry" count="3"/>
<option name="uses" value="1"/>
</attachment>everythings works..
....except:
<option name="removeUnits" value="Spain:all"/>all original (neutral) units there remain. What can be the reason for that?
-
@numetalfan so Spain is a True Neutral that changes into a Pro-Axis Neutral ?
If so you might need to remove the Neutral units before it changes ownership to pro-axis and then add them back as pro-axis after if needed.
You'd probably need separate triggers.
This is just a guess
-
The units do not belong to Pro-Allies. 'removeUnits' is looking into Spain and removing all Pro-Allies units.
Cheers...
-
so in the placement phase it is
<unitPlacement unitType="infantry" territory="Spain" quantity="3"/>
so no owner nation.
but the trigger has to be attached to someonethe units are located in:
...\units\Neutralmy first idea:
<attachment name="triggerSpaintoPro-Axis1" attachTo="Neutral" javaClass="TriggerAttachment" type="player">
<option name="when" value="after:Pro-AlliesCombatMove"/>
<option name="conditions" value="conditionAttachmentalliedbattlespain:conditionAttachmentobjectiveG4cn"/>
<option name="removeUnits" value="Spain:all"/>
<option name="uses" value="1"/>
</attachment>does not work, maybe it's because of
attachTo="Neutralhow to solve this ?
-
@numetalfan so Spain has changed to "Neutral_Axis" or w/e you have in your game. So try the attachTo="Neutral_Axis"
-
I am sorry, but I don't have a simple answer. The only way I am able to remove 'Neutral' units it to have a 'Neutral' player. '<option name="players" value="Neutral"/> dose not seem to work.
Again sorry.
Cheers...
-
@wc_sumpton said in placement/removeUnits Question:
I am sorry, but I don't have a simple answer. The only way I am able to remove 'Neutral' units it to have a 'Neutral' player. '<option name="players" value="Neutral"/> dose not seem to work.
Again sorry.
Cheers...
I think @redrum already clarified that the "Neutral" player is sort of a program hack to support simple "neutral" defensive units. For anything more complex than that, I believe you are supposed to have an actual player, hiding it and pre-assigning it to "Does Nothing".