Page MenuHomeWildfire Games

Template organization: the plane
ClosedPublic

Authored by Nescio on Nov 3 2017, 4:29 PM.

Details

Reviewers
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP20473: Move all units (which only is the Mustang plane) from the templates/other/…
Trac Tickets
#4770
Summary

Moves other/plane.xml to units/plane.xml

Test Plan

Check if everything works.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Nescio created this revision.Nov 3 2017, 4:29 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Nov 3 2017, 4:29 PM
Vulcan added a subscriber: Vulcan.Nov 3 2017, 5:17 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (307 tests)...................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (307 tests)...................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
leper added a reviewer: Restricted Owners Package.Nov 3 2017, 6:36 PM
leper added a subscriber: leper.

Check if everything works.

You are at least missing the cheat data file.

Then again I somewhat consider moving certain templates to structures/ or units/ to be somewhat strange since those shouldn't be created by default.

Then again I somewhat consider moving certain templates to structures/ or units/ to be somewhat strange since those shouldn't be created by default.

I agree with you, but on the other side there are already many not buildable structures in those folder. Iirc we discussed about that and you suggested a subfolder in structures, is that right?
(I remembered that when commiting that previous patch of Nescio. But then I think that if someone want to make that buildable again then there will be some moves again...)

I have on my side really no preference, nor solid input :/

Nescio added a comment.Nov 3 2017, 6:54 PM
In D1007#39540, @leper wrote:

Check if everything works.

You are at least missing the cheat data file.

Sorry, I'm unaware of its existence. Which file?

Then again I somewhat consider moving certain templates to structures/ or units/ to be somewhat strange since those shouldn't be created by default.

The plane is the only unit currently located in the other/ folder. Other unused units (e.g. noldor_ship_bireme, theb_mechanical_siege_fireraiser, viking_longboat) are located in units/
Furthermore, I understood (#4770) that units etc were to be removed from the other/ folder.

something like structures/other/ or structures_other/ ?

You are at least missing the cheat data file.

Sorry, I'm unaware of its existence. Which file?

Check in simulation/data/

In D1007#39547, @Nescio wrote:

Furthermore, I understood (#4770) that units etc were to be removed from the other/ folder.

#4770 was to clean the treasure and ruins thing. I submitted the problem of the other/ mess.

Another input, for the eyes it's better to have civ_ files in units/
plane doesn't fit well that scheme (same for noldor, viking, samnite and so on things).

In D1007#39547, @Nescio wrote:
In D1007#39540, @leper wrote:

Check if everything works.

You are at least missing the cheat data file.

Sorry, I'm unaware of its existence. Which file?

I suspect you don't know about grep(1) either.

grep -r path/to/things searchstring might be helpful. As always man grep is bound to yield more information.

(And now we wait for the ack/ag/ripgrep/whatever fans to suggest alternatives.)

As for where to move things, I don't know. Everything not starting with template_ or special/ is placeable, how to organize things should be done according to some logic (that might be nice to describe in some readme file so people can find things more easily, and know where to place them) that might want to take being createable by a normal player, being specific to certain modes, nice layout for maybe the AI (though that should just construct the list of entities similarly to the structree), and possibly more.

In D1007#39556, @leper wrote:

As for where to move things, I don't know. Everything not starting with template_ or special/ is placeable, how to organize things should be done according to some logic (that might be nice to describe in some readme file so people can find things more easily, and know where to place them) that might want to take being createable by a normal player, being specific to certain modes, nice layout for maybe the AI (though that should just construct the list of entities similarly to the structree), and possibly more.

Thx and ack.

Nescio added a comment.Nov 3 2017, 7:43 PM
In D1007#39556, @leper wrote:
In D1007#39547, @Nescio wrote:
In D1007#39540, @leper wrote:

Check if everything works.

You are at least missing the cheat data file.

Sorry, I'm unaware of its existence. Which file?

I suspect you don't know about grep(1) either.

Actually I used grep other/plane * on simulation/templates/, simulation/ai/, and maps/
I admit I didn't check simulation/data/, I was unaware of the cheats.

As for where to move things, I don't know. Everything not starting with template_ or special/ is placeable, how to organize things should be done according to some logic (that might be nice to describe in some readme file so people can find things more easily, and know where to place them) that might want to take being createable by a normal player, being specific to certain modes, nice layout for maybe the AI (though that should just construct the list of entities similarly to the structree), and possibly more.

A readme would be nice; I think the most important thing is that file naming and organization are consistent, to reduce the risk of files being overlooked.

Nescio added a comment.Nov 3 2017, 7:48 PM

Another input, for the eyes it's better to have civ_ files in units/
plane doesn't fit well that scheme (same for noldor, viking, samnite and so on things).

For the eyes it would be more pleasing if files were organized as:

units/
units/athen/
units/brit/

etc.
Plane, samnite, viking, etc would then stay in units/ and {civ} specific units in units/{civ}/
Mutatis mutandis for structures. Just a suggestion (and a lot of work at that).

Nescio updated this revision to Diff 4084.Nov 3 2017, 9:51 PM

Included cheat

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (307 tests)...................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (307 tests)...................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
elexis accepted this revision.Nov 17 2017, 6:09 PM
elexis added a subscriber: elexis.

Correctness:

Oh wait, Noldor is actually a civ, so the plane would be the first unit without a civ in templates/units/.
But it still is a unit and because its a template different from every other unit template, it seems ok to me to have it in that directory.
The other/ directory did more damage so far than adding unique unit templates in units/.

fatherbushidos only statement on this topic I found was in:
https://trac.wildfiregames.com/ticket/4770#comment:20

leper didn' say anything on the plane in particular besides that we should do it according to some logic.
Logic = have unit templates in units/ in this case.
The plane is an easteregg that doesnt fit to the game at all, so at least this part should not be in the readme.
Would be nice to have some documentation somewhere indeed, we should reconsider when deleting the directory for instance.
Until then I'll take this out of the review queue of 9 tickets related to this template reorganization mentioned in #4770.
(While at eastereggs one might reconsider the bombing capacities and turning angles of the plane while at it rP18465, but offtopic.)

Completeness:

  • This is the only unit in template/ according to my case insensitive search for "unit".
  • The only two maps using the plane are the flight demo ones.
  • Good point with the json file. I could have forgotton that easily too. Indeed the only json file about the plane.
  • No JS file have a "plane" case occurence.
This revision is now accepted and ready to land.Nov 17 2017, 6:09 PM
This revision was automatically updated to reflect the committed changes.