1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Moving Modules to Core

Discussion in 'Civ4 - Caveman 2 Cosmos' started by raxo2222, Jul 21, 2019.

  1. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    Some modules can be easily merged to core - Hydro, Vokayra, Platyping, StrategyOnly and some others.

    Moon Colony can be merged to Pepper's module.

    All art and schema was moved from modules to core, and soon building/unit classinfo files will be gone (merged into unit/building infos).

    I think only alt timelines, some DH modules, Pepper's module (merging Earth content to core would be preferable) and few others can stay here - traits and deactivated ones, maybe animal placing too.

    Existence of modules complicates stuff, since they have default tags, that cloud searching stuff in Notepad++.
    Also they may be overwriting stuff in core.
     
    Last edited: Jul 21, 2019
  2. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,160
    Gender:
    Male
    Location:
    Canberra, Australia
    Vokaya's stuff can't. It is not finished. Most of the stuff in there that was able to be merged in has been. Stuff that is awaiting more work for example when tags become available needs to be done then merged in. We have a list of what the wonders are supposed to do. I expect most of the tags are now available just no one has had the time to finish them off. They should stay separate until they are done as a reminder that work is still needed.

    Is Platyping mentioned as a source in the contributors documentation? If not then his should stay apart so that if there are problems we can go back to the original, perhaps even feed back any fixes to the original as well. ie be good community members.

    I am currently working on merging a number of my files into core along with those mentioned before that are in My Mods, are out of test and thus can be merged.

    Animal placing is still a work in progress and may well be completely moved into XML. Currently many parts of it are in the one Python file which is also used for Events which does make it difficult to coordinate between modders. Moving the stuff into XML would give us more flexibility.

    One thing that does need to be done is move the Religions out of core and into modules.

    They complicate things for the modders, correct but they let players have options and that is what they are there for.
     
    raxo2222 likes this.
  3. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    Platyping is in credit list.

    Also are you going to finish Vokayra module then? What needs to be done here?

    By the way religions will be like alt timelines stuff then.

    Even if modules are going to stay here for now you can merge buildings/units to one file for example Platyping's wonders or some alt timeline units are placed separately.
     
  4. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,160
    Gender:
    Male
    Location:
    Canberra, Australia
    I had some people in to do a major clean up of my place as far as I know the document that lists what has to be done to finish Vokayra's stuff is somewhere of the desk in the corner but since it is covered to the ceiling with stuff I need to sort out I doubt I will find it any time soon. I think the details are on the Caveman2Cosmos or Discussions thread of this forum.

    I am also "working" very slowly at the moment. If you want you could move three My Mods mods into core
    • Burial_Traditions
    • Neanderthal_Units
    • New_Cultures
     
    raxo2222 likes this.
  5. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    I think this needs to wait for Anq, as he removes building and unit classes.

    While clearing out commented building classes (left commented out animal and knowledge base building classes) can be fairly easy to manage, moving files would be more disruptive to him.
     
  6. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,160
    Gender:
    Male
    Location:
    Canberra, Australia
    I already discussed that. He said go ahead and merge. Otherwise what is the point of this thread?

    edit also the merge does not break saves.
     
    raxo2222 likes this.
  7. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    As so I'll merge those now.
     
  8. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,160
    Gender:
    Male
    Location:
    Canberra, Australia
    My stuff is going much slower than expected. I had to back track a couple of times, I have been enjoying the start of a new game at normal speed (going bad now I have reached Tribalism:p) and most importantly I should have not gone dancing yesterday. My knee was not yet strong enough:(
     
  9. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    Now I merged those three modules :D
     
    Fermongu likes this.
  10. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    Other than that I cleaned some duplicated stuff, and merged Hydro to core and Lunar Colony to Pepper's module.

    I'm tempted to do internal merge of modules - for example collecting Platypings wonders or Strategyonly's events together.
     
    KaTiON_PT likes this.
  11. Dancing Hoskuld

    Dancing Hoskuld Warlord

    Joined:
    Jul 5, 2004
    Messages:
    23,160
    Gender:
    Male
    Location:
    Canberra, Australia
    At least one of SO's events is not working, The Fine Clay one. It does not place the bonus on the map like it should. Also the Great Hunter one needs some tweaking to fit a bit better.

    Merging Platyping's is OK but some have Python associated with them and you would need to merge that also but I think PPIO does that so maybe leave them alone until after it has been merged in to avoid confusion.
     
    raxo2222 and Toffer90 like this.
  12. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    I think SO's civil war event was never actually setup too.

    Also I was talking about merging module stuff within module, so there isn't multiple building/unit/event infos scattered around (each event, building or unit in separate folder).
     
    Last edited: Jul 23, 2019
  13. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    @Anq or @alberts2 there is a lot of default tags in module units and buildings (and some in core).

    How to remove them without removing tags, that have seemingly default values, but are part of some structure for example yelds?
    Or when 0 isn't default value?
    Remove each default value individually?

    They clutter searching for stuff.

    For example some buildings in Platyping had a lot of default values.
     
    Last edited: Jul 23, 2019
  14. Anq

    Anq Chieftain

    Joined:
    Apr 14, 2019
    Messages:
    350
    Gender:
    Male
    Location:
    Anser (geese) HQ
    Those default tags can be safely removed, even the commerce/yield arrays that are all zeros (although some use zeros for padding). Almost every tag is optional from the dll's point of view, even if the schema still asserts at least one instance should be declared (in which case the schema can be edited to give them <minOccurs="0">)
    Those that cannot be omitted are the crash makers like arts and graphics (?)
     
  15. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    I know, but when I tried to mass remove them with regex in Notepad++ actually I would have to check if I didn't remove wrong ones.
    For example maxlatitude of 0 isn't default.

    There is seemingly couple thousands of such entries.

    And a lot of commerce/yield stuff uses 0 values for padding.
     
  16. Anq

    Anq Chieftain

    Joined:
    Apr 14, 2019
    Messages:
    350
    Gender:
    Male
    Location:
    Anser (geese) HQ
    How about making new tags like <CommerceGold>, <CommerceResearch>, etc., to fit in the usual commerce arrays so we don't need so much padding?
    (Yeah I can do some work to put this into trunk)
     
    raxo2222 likes this.
  17. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    Similarly there could be YieldFood, YeldProduction and YeldCommerce
     
  18. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,854
    Location:
    Norway
    It's pretty easy.
    Why not check what the default value is before removing tags with the default value?
     
  19. raxo2222

    raxo2222 Warlord

    Joined:
    Jun 10, 2011
    Messages:
    5,708
    Location:
    Poland
    I guess I could first try to cleanup ones with NONE inside tag, and ones written like that <tag/>
     
  20. Toffer90

    Toffer90 C2C Modder

    Joined:
    Oct 16, 2011
    Messages:
    5,854
    Location:
    Norway
    Yeah, but don't go doing that for every type of XML. Some info xml types needs even those to stay. You probably know what info types that are safe to remove tags in though, just saying.
     

Share This Page