wowgetoffyourcellphone Posted June 13, 2017 Report Share Posted June 13, 2017 The 6x6 foundation does not behave like other foundations when it transitions to scaffold variant. All the wood bits and stacks of stones and wheelbarrows disappear. I tried fixing it but it still won't work. I even used the 2x2 foundation actor as a guide, but it still wouldn't work. Bug in the mesh? 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 13, 2017 Report Share Posted June 13, 2017 Mmmh can you take a picture of what happens ? Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 14, 2017 Author Report Share Posted June 14, 2017 To Test: Build something large and watch the foundation. lmao... Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 14, 2017 Report Share Posted June 14, 2017 I'm on my phone can you copy the actor and template file here ? 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 14, 2017 Author Report Share Posted June 14, 2017 Here is the original from Public mod: <?xml version="1.0" encoding="utf-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="foundation 6x6 a"> <mesh>structural/found_6x6_a.dae</mesh> </variant> </group> <group> <variant frequency="1" name="Idle"> <props> <prop actor="props/structures/decals/dirt_6x6.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="woodpile001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="woodpile002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="woodpile003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick005" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/handcart_1.xml" attachpoint="handcart001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/handcart_1.xml" attachpoint="handcart002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile3.xml" attachpoint="brickpile001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile3.xml" attachpoint="brickpile002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile3.xml" attachpoint="brickpile003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Vase.xml" attachpoint="vase001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Vase.xml" attachpoint="vase002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Plank_Pile_Big_a.xml" attachpoint="plankpile001" maxheight="20" minheight="-20"/> </props> </variant> <variant name="scaffold"> <props> <prop actor="props/structures/construction/scaf_4x4.xml" attachpoint="root"/> <prop actor="props/structures/decals/dirt_6x6.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> </props> </variant> </group> <group> <variant frequency="1"> <textures><texture file="structural/foundation.dds" name="baseTex"/></textures> </variant> </group> </actor> Interestingly, it's noticeably different from a foundation that works correctly, the 2x2: <?xml version="1.0" encoding="utf-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="foundation 2x2 a"> <mesh>structural/found_2x2_a.dae</mesh> </variant> </group> <group> <variant frequency="1"> <props> <prop actor="props/structures/decals/dirt_2x2.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="Delimitator001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="Delimitator002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="Delimitator003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="Delimitator004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="wood_pile001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile_Big1.xml" attachpoint="brickpile001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile_Big2.xml" attachpoint="brickpile002" maxheight="20" minheight="-20"/> </props> </variant> </group> <group> <variant frequency="1"> <textures> <texture file="structural/foundation.dds" name="baseTex"/> </textures> </variant> </group> <group> <variant frequency="1" name="Idle"> <props> <prop actor="props/structures/decals/dirt_2x2.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> </props> </variant> <variant name="scaffold"> <props> <prop actor="props/structures/construction/scaffold.xml" attachpoint="root"/> <prop actor="props/structures/decals/dirt_2x2.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> </props> </variant> </group> <material>basic_trans.xml</material> </actor> So, I tried to make the 6x6 use almost the exact same format as the 2x2: <?xml version="1.0" encoding="utf-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="foundation 6x6 a"> <mesh>structural/found_6x6_a.dae</mesh> </variant> </group> <group> <variant frequency="1"> <props> <prop actor="props/structures/decals/dirt_6x6.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="woodpile001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="woodpile002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/wood_pile.xml" attachpoint="woodpile003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Delimitator.xml" attachpoint="delimitator004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick.xml" attachpoint="brick005" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Box.xml" attachpoint="box004" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/handcart_1.xml" attachpoint="handcart001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/handcart_1.xml" attachpoint="handcart002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile3.xml" attachpoint="brickpile001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile3.xml" attachpoint="brickpile002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Brick_Pile3.xml" attachpoint="brickpile003" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Vase.xml" attachpoint="vase001" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Vase.xml" attachpoint="vase002" maxheight="20" minheight="-20"/> <prop actor="props/special/eyecandy/Plank_Pile_Big_a.xml" attachpoint="plankpile001" maxheight="20" minheight="-20"/> </props> </variant> </group> <group> <variant frequency="1" name="Idle"> <props> <prop actor="props/structures/decals/dirt_6x6.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> </props> </variant> <variant name="scaffold"> <props> <prop actor="props/structures/construction/scaf_4x4.xml" attachpoint="root"/> <prop actor="props/structures/decals/dirt_6x6.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> </props> </variant> </group> <group> <variant frequency="1"> <textures> <texture file="structural/foundation.dds" name="baseTex"/> </textures> </variant> </group> <material>basic_trans.xml</material> </actor> But it doesn't work. Still has the same behavior. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 14, 2017 Report Share Posted June 14, 2017 You could try to move all the tags in the first group in the same variant to see. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 15, 2017 Author Report Share Posted June 15, 2017 22 hours ago, stanislas69 said: You could try to move all the tags in the first group in the same variant to see. Thanks for the suggestion. I thought it would work, but it didn't. I put all of the props into all of the variants, but when the scaffold variant played the props disappeared inexplicably, even though all the props were placed into that variant too. Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 15, 2017 Report Share Posted June 15, 2017 @wowgetoffyourcellphone Make sure the template does not another model maybe that's it. 1 Quote Link to comment Share on other sites More sharing options...
s0600204 Posted June 15, 2017 Report Share Posted June 15, 2017 @wowgetoffyourcellphone The Chinese Imperial Court depicted in your video uses the 8x8 foundation template (which is also bugged in the same way). Looking at your mod's files it appears that all the fortresses, except those built by Carthaginian, Briton or Scythian units, use 6x6. For which, the changes you suggest should work (at least they do for me). (As a further note, I notice you have copies of several foundation actor files in your mod which seem identical to those in 0ad-vanilla.) @stanislas69 Do you feel like creating a patch against 0ad to fix this? (And perhaps sort out the inconsistent indenting in the affected files at the same time?) 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 15, 2017 Report Share Posted June 15, 2017 58 minutes ago, s0600204 said: @wowgetoffyourcellphone The Chinese Imperial Court depicted in your video uses the 8x8 foundation template (which is also bugged in the same way). Looking at your mod's files it appears that all the fortresses, except those built by Carthaginian, Briton or Scythian units, use 6x6. For which, the changes you suggest should work (at least they do for me). (As a further note, I notice you have copies of several foundation actor files in your mod which seem identical to those in 0ad-vanilla.) @stanislas69 Do you feel like creating a patch against 0ad to fix this? (And perhaps sort out the inconsistent indenting in the affected files at the same time?) Sure, not sure what's causing the issues though ? Quote Link to comment Share on other sites More sharing options...
s0600204 Posted June 15, 2017 Report Share Posted June 15, 2017 At a guess: when the foundation is placed, 0ad chooses a variant from each group based on their frequency, and the end result is a combination of these choices (the mesh is chosen from the first group, texture from the third, and so on). If there is no frequency defined for a variant, then that variant won't ever be chosen. When the units in-game reach the foundation and start building, 0ad switches to the specifically named "scaffold" variant in all the groups that have a variant by that name (if a given group doesn't have a variant by that name, then the output from that group doesn't change). In the unedited 6x6 foundation file wgoyc pasted above, we can see that the second group has both both an "Idle" and a "scaffold" variant. The first has the eyecandy bricks and piles of wood etc, but the latter does not. So when 0ad switches to the "scaffold" variant, all the eyecandy disappears. The edited 6x6 file works because the eyecandy is in a different group which happens to not have a variant with the name "scaffold" and so is not affected by the switch. Essentially, his suggested change based on the 2x2 actor is correct. So just make a patch based on that, and make similar changes to the 8x8 foundation actor. 1 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 16, 2017 Author Report Share Posted June 16, 2017 Thanks. You guys make me feel noob sometimes, but I learn. Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 16, 2017 Report Share Posted June 16, 2017 Okay I'll make a patch tonight. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 16, 2017 Author Report Share Posted June 16, 2017 10 hours ago, s0600204 said: Essentially, his suggested change based on the 2x2 actor is correct. So just make a patch based on that, and make similar changes to the 8x8 foundation actor. Yep, this worked. Yeah, it's been bothering me for a while. not sure why anyone else never mentioned it. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 16, 2017 Report Share Posted June 16, 2017 I wish we had a more extensive guide about 0ad actors. With optional parameters naming convention frequency convention etc I could write a draft if this is wanted. 5 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 16, 2017 Report Share Posted June 16, 2017 @wowgetoffyourcellphone @s0600204 https://code.wildfiregames.com/D651 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted August 21, 2017 Report Share Posted August 21, 2017 @s0600204 you should commit this, since you reviewed it properly. Quote Link to comment Share on other sites More sharing options...
s0600204 Posted August 21, 2017 Report Share Posted August 21, 2017 Committed: https://code.wildfiregames.com/rP20020 Thank you @stanislas69 for the patch, and apologies it took this long to review and commit it! 2 Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 21, 2017 Report Share Posted August 21, 2017 @s0600204 A pleasure to help, and a little compensation for your hard work on mods 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.