How do you create a replacing tile mod?

Hi,

I want to create a mod that replaces an original tile. I tried everything I could think off but all I got was a mixed up tile where my new buildings are together with the original ones that one tile or both tiles spawning by random. Even if I replace the original tile files it does not work. As if the original tiles where hard coded. I do not hope that this is the case because that would be hell for modders. So how do you create a replacing tile mod?

Regards

Marc

 

 

3,932 views 3 replies
Reply #1 Top

First, if you just replace the file in /data/ that won't do anything. There is a way to make that work, but I don't recommend it because it creates other errors.

Second, I've not been able to do this myself. I THINK it's the problem I described here https://forums.elementalgame.com/394013 after James009D pointed out the issue. Specifically,

overwriting dosent clear the old data, it just overwrites it, expect for things that can be stacked

End of quote

Since <tiledesignobject> tag can clearly be stacked, I think we can't do anything about it at the moment. You can either google how to make a new data.zip or wait for a fix.

Reply #2 Top

We need some kind of an override command. :(

Reply #3 Top

One way around this is to add an unachievable prereq to the original tile so that it's permanently unavailable then create a duplicate of the original xml data referencing your new tile.

EDIT: I've not done this particular thing myself but i've been using similar rule bending for other things. :grin: I have a feeling you may have to create a "fake" tech in the tech tree that's never researched and use that as the prerequisite.

Of course, even if this works it's a really clunky way of doing things and hopefully this duplication problem will go away soon.

 

EDIT2: I used this kind of thing to stop huts auto upgrading to houses by making the huts upgrade to a fake house. I prevented my fake house appearing by using;

    <Prereq>
      <Type>Tech</Type>
      <Attribute>NULL</Attribute>
      <Value>0</Value>
    </Prereq>

So a fake tech isn't required in the tech tree.