Jump to content

6x6 foundation actor is bugged.


wowgetoffyourcellphone
 Share

Recommended Posts

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.

 

 

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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?)

  • Like 1
Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...