Opened 7 years ago

Closed 6 years ago

Last modified 5 years ago

#4770 closed defect (fixed)

Organize treasures and ruins templates

Reported by: fatherbushido Owned by:
Priority: Should Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Patch:

Description (last modified by elexis)

Treasure templates inherit from template_gaia_treasure. But it seems that some are in other/ folder and some are in /gaia folder. Task:

  • check if that is intended (commit history will help)
  • move the according template in the adhoc folder
  • change the refs in the maps files
template_gaia_treasure.xml

gaia/special_ruins.xml
gaia/special_ruins_column_doric.xml
gaia/special_ruins_standing_stone.xml
gaia/special_ruins_stone_statues_egyptian.xml
gaia/special_ruins_stone_statues_roman.xml

gaia/special_treasure_food_barrel.xml
gaia/special_treasure_food_barrels_buried.xml
gaia/special_treasure_food_bin.xml
gaia/special_treasure_food_crate.xml
gaia/special_treasure_food_jars.xml
gaia/special_treasure_food_persian_big.xml
gaia/special_treasure_food_persian_small.xml
gaia/special_treasure_golden_fleece.xml
gaia/special_treasure_metal.xml
gaia/special_treasure_metal_persian_bigl.xml
gaia/special_treasure_metal_persian_small.xml
gaia/special_treasure_pegasus.xml
gaia/special_treasure_standing_stone.xml
gaia/special_treasure_stone.xml
gaia/special_treasure_wood.xml

other/special_treasure_shipwreck.xml
other/special_treasure_shipwreck_debris.xml
other/special_treasure_shipwreck_ram_bow.xml
other/special_treasure_shipwreck_sail_boat.xml
other/special_treasure_shipwreck_sail_boat_cut.xml

Change History (31)

comment:1 by fatherbushido, 7 years ago

Summary: Organize treasure templateOrganize treasure templates

comment:2 by elexis, 7 years ago

Should do a text search for other/, I suspect some things in the structree, rmgen and selection panels (and perhaps AI code) might need to be renamed (nothing serious though).

comment:3 by fatherbushido, 7 years ago

In the same spirit, gaia ruins templates are in other/ and in gaia/

(That other/ folder...)

comment:4 by elexis, 7 years ago

ruins and treasure in gaia/: Ruins work the same way as resources. On the other hand they are man-made, so not what we see as "gaia". So perhaps treasure and ruins should just be moved to other/. Then gaia looks clean enough IMO and doesn't for instance need new subdirectories.

other/ and special/: other/territory_pull.xml is weird. It's the only entity that isn't visible ingame, so maybe that should be moved to some "special" directory that isn't special/ according to the unplaceable definition. (Rename special/ to unplaceable/?) The palisade templates should be moved to templates/ and/or template/structures/ as proposed by some other ticket. Then other/ will be clean enough too I guess. (subdirectories like units and structures possibly, dunno)

comment:5 by fatherbushido, 7 years ago

(I would bend for ruins and treasure in gaia.)

comment:6 by fatherbushido, 7 years ago

Well looking a bit at history, I won't sum up that here.

r7259 is the sim2 initial commit with only 1 thing in other/

r7889 r7980 r8110 for example started to populate other/ with mostly gaia or decorative things

r8150 similar things are commited in gaia/

r10650 introduced proper treasure and ruins generic templates

r11066 some things in other/ change their parents

r8571 some things are added in other/ and some are changed in gaia/

I stopped that here. I am for moving ruins and treasures in other/ which inherits from that template_gaia_foo things to gaia/ (also I wonder if _special_ in the name of those templates is really relevant)

Last edited 7 years ago by fatherbushido (previous) (diff)

comment:7 by elexis, 7 years ago

Description: modified (diff)

(edit description: alphabetic sorting + ruins)

comment:8 by elexis, 7 years ago

On the other hand they are man-made, so not what we see as "gaia".

Defining gaia as everything that inherits template_gaia as you propose is better, agree.

Also agree that special in the template name is weird (If that is the special treasure, where is the non-special treasure?) and could be very well removed:

gaia/treasure_wood.xml
gaia/treasure_shipwreck_debris.xml
gaia/ruins_column_doric.xml

comment:9 by fatherbushido, 7 years ago

Sounds good.

special take its roots here https://trac.wildfiregames.com/wiki/List%3A_Entities%3A_Nature%3A_Special

(mainly all the gaia special things we place on a map)

Last edited 7 years ago by fatherbushido (previous) (diff)

comment:10 by fatherbushido, 6 years ago

Summary: Organize treasure templatesOrganize treasures and ruins templates

comment:11 by Nescio, 6 years ago

fatherbushido invited me to this, so here I am.

So if I understand correctly, this patch proposes:

  • to remove the “special” part from ruins' and treasures' names
  • to move the shipwrecks from other/ to gaia/
  • to fix all parent entities in .xml files
  • to look for their use in other files (e.g. in maps/) and change them to new file location names

If that's all, then I think I could do it; renaming files is not difficult.

However, a few other things:

  • other/ also includes many structure templates; maybe those should be moved to structures/ then?

Defining gaia as everything that inherits template_gaia as you propose is better, agree.

  • In that case all fauna have to be moved from gaia/ to units/ (unless you change the template_unit_fauna* templates to use template_gaia.xml as their parent).
  • It might be a good idea to create a couple of subdirectories within gaia/ to group related files, e.g.:
    • gaia/fauna/
    • gaia/flora/
    • gaia/geology/
    • gaia/ruins/
    • gaia/treasures/

comment:12 by fatherbushido, 6 years ago

For the plan, yest that's it.

other/ also includes many structure templates; maybe those should be moved to structures/ then?

I hate that folder which has become the thing where you put everything. Indeed many things in it could move elsewhere, mostly in other/ Basically that task will do a first step. I think to a subfolder of structure where we can put scenario only and things like that. But I have no real idea, nor conviction about that.

In that case all fauna have to be moved from gaia/ to units/ (unless you change the template_unit_fauna* templates to use template_gaia.xml as their parent).

Current organization about that is ok. gaia is about gaia things :p

It might be a good idea to create a couple of subdirectories within gaia/ to group related files [...]

perhaps, but in that case, the name scheme seems clear enough.

comment:13 by Nescio, 6 years ago

That's a quick reply!

other/ also includes many structure templates; maybe those should be moved to structures/ then?

I hate that folder which has become the thing where you put everything. Indeed many things in it could move elsewhere, mostly in other/ Basically that task will do a first step. I think to a subfolder of structure where we can put scenario only and things like that. But I have no real idea, nor conviction about that.

Yeah, I never understood the other/ folder either. As for the structures there, maybe those could be moved simply to the structures/ folder; e.g. pers_tacara.xml (an unused structure) is in structures/, but pers_warehouse.xml (another unused structure) is in other/. Anyway, that's probably outside the scope of this discussion.

Current organization about that is ok. gaia is about gaia things :p

Yes, I agree; however, not all gaia things are in gaia/

It might be a good idea to create a couple of subdirectories within gaia/ to group related files [...]

perhaps, but in that case, the name scheme seems clear enough.

Personally I think e.g. treasure/* is better than treasure_*; in the future more files will probably be added; and having half a dozen folders with a few dozen files each works better in my experience than one folder with hundreds of files.

For the plan, yest that's it.

Then I suppose I could start; are you going to review it on phabricator?

comment:14 by fatherbushido, 6 years ago

Sure I will! (Try to use the proper thing if you have file to move.)

comment:15 by Nescio, 6 years ago

Sure I will! (Try to use the proper thing if you have file to move.)

What is the “proper thing”?

comment:16 by Nescio, 6 years ago

gaia/special_treasure_golden_fleece.xml and gaia/special_treasure_pegasus.xml have template_gaia_geo_mineral as their parent, instead of template_gaia_treasure; what to do with them? Change their parent or make them minerals?

comment:17 by Nescio, 6 years ago

Furthermore, these three also have template_gaia_ruins as their parent:

  • other/pyramid_great.xml
  • other/pyramid_minor.xml
  • other/unfinished_greek_temple.xml

What remains in other/:

  • other/plane.xml is an unit
  • special_catafalque.xml is an unit, as are the templates in catafalque/*
  • territory_pull.xml is weird (no parent)
  • all other templates are actually structures

comment:18 by fatherbushido, 6 years ago

Enjoy the task :) Your choice. Imo -> treasure (change their parent) https://trac.wildfiregames.com/changeset/8150/ https://trac.wildfiregames.com/changeset/7778/

comment:19 by fatherbushido, 6 years ago

Furthermore, these three also have template_gaia_ruins as their parent:

other/pyramid_great.xml other/pyramid_minor.xml other/unfinished_greek_temple.xml

yes -> gaia ruins

comment:20 by fatherbushido, 6 years ago

What remains in other/:

(keep that for another patch)

other/plane.xml is an unit

-> could go in unit

special_catafalque.xml is an unit, as are the templates in catafalque/*

special_catafalque.xml -> could go in root template_unit_catafalque catafalque/* -> could go in unit (perhaps in a subfolder)

territory_pull.xml is weird (no parent)

If it was not placeable it could go in special/ So no clue.

all other templates are actually structures

so they should go in structures. We could discuss about the palisades (there are things to do with that).

comment:22 by elexis, 6 years ago

In 20385:

Move catafalque relic templates from the "other" directory to the regular units directory.

Differential Revision: https://code.wildfiregames.com/D994
Refs #4770, D152, D269
Patch By: Nescio
Some comments by fatherbushido

comment:24 by elexis, 6 years ago

In 20473:

Move all units (which only is the Mustang plane) from the templates/other/ directory to the templates/units/ directory, refs #4770.

Differential Revision: https://code.wildfiregames.com/D1007
Patch By: Nescio
Comments By: fatherbushido, leper

comment:25 by elexis, 6 years ago

In 21093:

Move ruins templates to a new gaia/ruins/ subfolder.

Remove the "special" prefix since they are not special in any way.
Delete special_ruins.xml from rP10905 as it is identical to special_ruins_column_doric.xml from rP8574.

Differential Revision: https://code.wildfiregames.com/D990
Based on patch by: Nescio
Refs #4770, D989
Comments By: fatherbushido, leper

comment:26 by elexis, 6 years ago

In 21094:

Move ruins templates from other/ to gaia/ruins/.

Differential Revision: https://code.wildfiregames.com/D991
Based on patch by: Nescio
Refs #4770, D989
Comments By: fatherbushido, leper

comment:27 by elexis, 6 years ago

In 21095:

Move gaia/special_treasure_* to gaia/treasure/.
Rename metal_persian_bigl to metal_persian_big.

Differential Revision: https://code.wildfiregames.com/D989
Refs #4770
Patch By: Nescio
Comments By: fatherbushido, leper

comment:28 by elexis, 6 years ago

In 21096:

Move other/special_treasure_* to gaia/treasure/.

Differential Revision: https://code.wildfiregames.com/D992
Refs #4770, D989
Patch By: Nescio
Comments By: fatherbushido, leper

comment:29 by elexis, 6 years ago

Keywords: simple removed
Milestone: BacklogAlpha 23
Resolution: fixed
Status: newclosed
Type: taskdefect

Thanks for the plan (execution was the easy part).

comment:30 by elexis, 5 years ago

In 22797:

Move other/wallset_palisade to structures/wallset_palisade, refs #4770, D1002, D1798.

Differential Revision: https://code.wildfiregames.com/D1881
Patch By: Nescio

While at it, fix ESLint overshadowing warning in survival triggers from rP18209, unnoticed in rP18430 and rP19359 but noticed by Jenkins.

comment:31 by wraitii, 5 years ago

In 22982:

Move palisades from other/ to structures/

Following D1881 which introduced a common parent, palisade templates can be moved:

  • other/palisades_rocks_* to structures/palisades_*
  • other/palisades_*_spike* to structures/palisades_spike*

Map scripts were updated accordingly.

Patch By: Nescio

Reviewed By: wraitii

Refs #4770

Differential Revision: https://code.wildfiregames.com/D2234

Note: See TracTickets for help on using tickets.