Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DinoMod updates via git subtree #39157

Closed
wants to merge 60 commits into from
Closed

Conversation

damien
Copy link
Contributor

@damien damien commented Apr 1, 2020

Summary

SUMMARY: [Mods] "DinoMod overhaul: New dinosaurs and dinosaur behaviors, updated for 0.E"

Purpose of change

This PR brings in a lot of new DinoMod content authored by @LyleSY. Changes include:

  1. Modernized JSON throughout DinoMod.
  2. New dinosaurs and dinosaur behavior leveraging JSON tags that were not available when DinoMod was first authored.
  3. Adds an egg-laying mechanic for dinosaurs in the world. Eggs are laid in spring and summer and will hatch using mechanics similar to bird eggs.

Describe the solution

I'm going to use this portion to describe the commits for this PR. I'm experimenting with a new workflow here that allows the DinoMod team to decouple development on the DinoMod source code while still allowing us to sync stable releases of the mod to the C:DDA repo.

I'm using git subtree to do this. In breif, this allows me to pull commits from an external repository and place them in a subdirectory of a git repository. In this instance, I'm using git subtree to pull cataclysm-mods/DinoMod and place the contents of that repository into data/mods/DinoMod.

I created this PR using git subtree, specifically using the following series of commands:

  1. git subtree split --prefix data/mods/DinoMod
    This creates a commit git ref containing the contents of the DinoMod directory, the entity of the git commit history for those files, and nothing else. This commit was then pushed to cataclysm-mods/DinoMod where new development against DinoMod was coordinated and mod project plans are now documented.
  2. git rm data/mods/DinoMod
    This was required prepare a clean DinoMod directory for git subtree to work with. It doesn't like performing operations on directories with existing code.
  3. git add --prefix data/mods/DinoMod git@github.com:cataclysm-mods/DinoMod.git
    This tells git to take the new DinoMod repository and put it's contents into data/mods/DinoMod. The new contents of that directory will reflect the latest state of cataclysm-mods/DinoMod and preserve all the history of changes made to files under data/mods/DinoMod including the history of the files prior to DinoMod being split into an external repository. You can verify this by running the following git command against this branch: git log -- data/mods/DinoMod.

Describe alternatives you've considered

Organizing work for DinoMod through C:DDA's repo. This requires either a C:DDA project member with permissions to manage issues/PRs/projects willing to help manage development and planning of DinoMod, or giving a member of @cataclysm-mods/dinomod-maintainers sufficient permissions in C:DDA to do the same.

Testing

  1. I've verified that all files in DinoMod are valid according to json_format. https://github.com/cataclysm-mods/DinoMod has also implemented a Github PR and master branch check that prevents merging of code that fails the JSON lint/validation done by C:DDA. See cataclysm-mods/DinoMod:.github/workflows/cdda-json-format.yml implementation details; this should behave identically to lints performed on CleverRaven/Cataclysm-DDA
  2. Both @LyleSY and I have done basic game play testing with this mod enabled. I've observed no obvious issues running DinoMod against 0.E or experimental releases from within the last week.

Additional context

Git log after git subtree split+add: https://gist.github.com/damien/61bab2f86b9942ca8711ae0a9a0f34a5

damien and others added 30 commits February 4, 2020 21:05
Changes mon_zombie_fast to mon_zombie_dog.  Initial testing shows that
it works OK.
Instead of one array "place_specials" with entries stating their type (toilet, npc, ...), there are now several arrays, one for each special type.
The entries in it do *not* repeat the type of the special.

This also gets rid of the jmapgen_place_special_op enumeration and uses classes with virtual functions instead.

Also fixes some bug:
- placing a gas pump with a defined charge count (not the default) would place a toilet.
- repeated calls to jmapgen_int::get() can return different values each
  time, that could lead to mapgen being applied to different places.
Make separate arrays for placing items from groups, monster spawn points and vehicles.

This allows each of those things to be specified via the terrain mapping based on a simple charachter key.
This avoids stating the coordinates of the toilets explicitly and uses the mapgen terrain data.
* origin/pr/11895:
  Bad macro, go away.
  Make tiles rotate properly when connected to walls.
  Update the tilsets to merge the wall types
  Add CONNECT_TO_WALL to terrain to control which terrains should connect with a adjacent wall.
  Replace using "AUTO_WALL" symbol with a flag
  Change ter_bitflags_map to be initialized statically.
  Unify the horizontal and vertical wall-like terrains
  Use terfind in savegame_legacy.cpp
  Use ter_at/furn_at to get the object directly instead of looking it up later.
* Adds a vermin version of wasps. Not sure if the small_bites flag
really fits, we lack a sting flag. ID is "mon_wasp_small" because giant
wasps already use the normal ID. Changing the giant wasps to use
"mon_wasp_wasp" would entail changes to source, tilesets, etc. Will go
through with said changes if others insist.
* Added normal wasps to monstergroups (mainline and dinomod) in the same
locations as giant wasps, using similar logic as non-giant insect
spawns. Now if I knew a good way to have them sometimes be household
pests...
- The size is all uppercase.
- There is no monster flag "DEAF".
- The flag is named ACIDPROOF, not ACID_PROOF.
- There is no trigger "BONES".
- There is no flag "SMALL_BITER".
They are not used anywhere in the code.
… nerfed to match turkeys. The dinos are in the sewers. Compies and eoraptors added to GROUP_SAFE monster group so they should pop up in some new places. The dinos must flow. -LyleSY
Reclusive-reptile and others added 18 commits February 4, 2020 22:16
* Skip validation of obsolete mods unless explicitly requested

* Set some mods obsolete
* Eliminate redundancy in directional peers

* Add dead ends (fake)

* Despaghettify road polishing

* Rotate overmap terrain symbols instead of reading their rotated versions

- They break "atomicity" of terrain objects.
- No need to bloat json with repetitive stuff (source of errors).

* Remove clumsy operators

* Apply generic factory to overmap terrains

* Remove redundant fields from JSON

* Separate immutable objects (flyweights) from those that vary (rotated, linear)

* Tweak rotation of overmap terrains

* Encapsulate some of the variables

* Encapsulate constructors

* Use terrain type in weighted lists

* Add missing dereference operator

* Mitigate string comparison in locations

* Mitigate string comparison in "polishing"

* Deduplicate spawns

* Remove unnecessary NOWRAP from linting rules

* Even more curly braces

* Encapsulate some more member variables

* Add comments (TODOs)
* adds volume & weight to monsters

also changes meat chunks calculation

* json conversion - monsters.json

* json conversion - /monsters/*.json

* json conversion - mods

* granulated birds, bots, drones (jsons)

Co-Authored-By: nexusmrsep <39925111+nexusmrsep@users.noreply.github.com>
* Obsolete mods

* Merge no_reviving_zombies into classic_zombies
Matches pending DinoDNA PR with new dino spawns, bugfix, dino riding, dino pets, and dino farming.
Triceratops should be ridable, plus formatting fixes
…1974d0db9'

git-subtree-dir: data/mods/DinoMod
git-subtree-mainline: bfa1602
git-subtree-split: 0d385a8
Copy link
Member

@anothersimulacrum anothersimulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're reversing modernizing of weight strings a fair bit here.
I'd also suggest using larger units that ml - Liters exist too.

{
"type": "COMESTIBLE",
"id": "egg_dino",
"name": "dinosaur egg",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "dinosaur egg",
"name": { "str": "dinosaur egg" },

Please use this format throughout.

@ZhilkinSerg
Copy link
Contributor

#26525 was merged to dev branch, which will be merged to master soon. Maybe there are will be more clear commit history and less conflicts after that?

@ZhilkinSerg ZhilkinSerg added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON [Markdown] Markdown issues and PRs Code: Build Issues regarding different builds and build environments Mods Issues related to mods or modding labels Apr 2, 2020
@damien
Copy link
Contributor Author

damien commented Apr 3, 2020

@ZhilkinSerg sadly, I don't think this is the case. When I do a git log against this branch vs CDDA master pre-dev-branch-integration, I saw only a few new commits which were also merged into dev.

This branch was a bit of an experiment and I've gotten a lot of great feedback both on Github and via the CDDA Discord. I'll be closing this out and reaching out to the powers that be to get me and the rest of the DinoMod maintainers triage privileges against the CDDA issue board so we can manage things that way instead.

@damien damien closed this Apr 3, 2020
@damien damien deleted the dinomod-subtree branch April 3, 2020 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments <Documentation> Design documents, internal info, guides and help. [JSON] Changes (can be) made in JSON [Markdown] Markdown issues and PRs Mods Issues related to mods or modding
Projects
None yet
Development

Successfully merging this pull request may close these issues.