Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits)

hello again. new mutate data question. how i can smaller this?

<mutators>
    <add_element parent_type="race" parent_id_attribute="id" parent_id_value="race_human">
        <available_structure id="human_cm"/>
    </add_element>
    <add_element parent_type="race" parent_id_attribute="id" parent_id_value="race_human">
        <available_structure id="human_tm"/>
    </add_element>
    <add_element parent_type="race" parent_id_attribute="id" parent_id_value="race_human">
        <available_structure id="human_wb"/>
    </add_element>
    <add_element parent_type="race" parent_id_attribute="id" parent_id_value="race_human">
        <available_structure id="human_bs"/>
    </add_element>
</mutators>

below not work (work only "human_cm")

<mutators>
    <add_element parent_type="race" parent_id_attribute="id" parent_id_value="race_human">
        <available_structure id="human_cm"/>
        <available_structure id="human_tm"/>
        <available_structure id="human_wb"/>
        <available_structure id="human_bs"/>
    </add_element>
</mutators>

and, structure data "needs_road_access" not working? i set true and nothing changes.

ps: in some cases, when click on error view in main menu, game crashes and crash log full spam. sample:

<mutators>
    <add_element parent_type="race" parent_id_attribute="id" parent_id_value="race_human">
        <available_structure id="human_tm" id="human_wb" id="human_bs" id="human_cm"/>
    </add_element>
</mutators>

Right now add_element will only add the first descendant. That was the simplest approach from a code standpoint. I could make it able to add multiple, but it doesn't seem like that big an issue to me.

needs_road_access is only used for UI feedback for the player. If a structure has needs_road_access set to true, then you'll see a warning icon in the game if the structure doesn't have a walkable hex (road or empty) adjacent to it.

<available_structure id="human_tm" id="human_wb" id="human_bs" id="human_cm"/>

Duplicate attributes aren't allowed in XML, and due to the way the data mutators are executed that XML file is parsed (and throws an error) for every datafile loaded.

Did I get everything? Thanks for all of the questions, by the way.

oh okay. 
is there a possibility add requirements building beside? (bridge required road or gate \ watermill required road to get sprite position\ or  if there is a nearby river, farm more produces food )

I'm planning on something like that for the Boats Update. If you have something specific in mind I could slip it in earlier.