Opened 2 years ago

Closed 19 months 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 (29)

comment:1 Changed 2 years ago by fatherbushido

Summary: Organize treasure templateOrganize treasure templates

comment:2 Changed 2 years ago by elexis

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 Changed 2 years ago by fatherbushido

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

(That other/ folder...)

comment:4 Changed 2 years ago by elexis

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 Changed 2 years ago by fatherbushido

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

comment:6 Changed 23 months ago by fatherbushido

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 23 months ago by fatherbushido (previous) (diff)

comment:7 Changed 23 months ago by elexis

Description: modified (diff)

(edit description: alphabetic sorting + ruins)

comment:8 Changed 23 months ago by elexis

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 Changed 23 months ago by fatherbushido

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 23 months ago by fatherbushido (previous) (diff)

comment:10 Changed 23 months ago by fatherbushido

Summary: Organize treasure templatesOrganize treasures and ruins templates

comment:11 Changed 22 months ago by Nescio

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 Changed 22 months ago by fatherbushido

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 Changed 22 months ago by Nescio

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 Changed 22 months ago by fatherbushido

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

comment:15 Changed 22 months ago by Nescio

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

What is the “proper thing”?

comment:16 Changed 22 months ago by Nescio

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 Changed 22 months ago by Nescio

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 Changed 22 months ago by fatherbushido

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

comment:19 Changed 22 months ago by fatherbushido

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 Changed 22 months ago by fatherbushido

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 Changed 22 months ago by elexis

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 Changed 21 months ago by elexis

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 Changed 19 months ago by elexis

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 Changed 19 months ago by elexis

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 Changed 19 months ago by elexis

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 Changed 19 months ago by elexis

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 Changed 19 months ago by elexis

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

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

Note: See TracTickets for help on using tickets.