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

XML Rebuild - Calling for help!

Discussion in 'Rise from Erebus Modmod' started by Valkrionn, Dec 31, 2009.

  1. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    What is this Rebuild, and why are we doing it?

    Currently we're going through all of RifE's XML/Python, and searching for things that can be done better. Whether it's to fix bugs, reduce CPU usage, or make it more user-friendly and understandable.

    Part of this is reordering the xml files. It will make it easier for modmodders, easier to find things in Worldbuilder, and easier for us as well. :lol: When this was just Malakim+, I got in the habit of making additions to the bottom of files... Was easier to update. Now though, those additions can be up to a third of the file. Not a good system any more. :mischief:

    For example (and the only one about done) PromotionInfos.xml is being reordered so it makes sense. Several subgroups are being made (Or updated, for most of them), and within them promotions are alphabetized. Race, Equipment, Triforce (Small group by itself, wanted it easy to see in the WorldBuilder), Gear (Master Building stuff), Effects (Promos you can't gain normally that don't fall in a different category) and finally, Promotions, everything that doesn't fit elsewhere. I'm changing a few things as I go through, getting rid of stuff we don't need, so on.



    Now, the part where I ask for help:


    It would be a HUGE help if some of you could reorder XML files like this. That would free me up to just looking for what could be better, rather than spend ages organizing.

    For example: Units. Sure, you could have them in just alphabetical order... But what I'd prefer is a section for Equipment units up top (Treasure Chests come first, as they do already), followed by Heroes, then Great People, then standard units. Sorted by UnitCLASS, so the Warrior is followed by all UU's which replace him. That setup is already in place, we just need to reorder everything that has been added.

    Or Civics would be grouped by civicoption, and Improvements could be grouped into UF, Unique (Requires a certain civ), and regular.



    How do you do this? To use the UnitInfos file as an example:


    The EASIEST way I've found is to download NotePad++, open the file, and press [Alt + 3]. This should collapse each unit entry without collapsing any subentries, which would cause cut/paste issues otherwise.

    The vast majority of entries will have a comment on the line they are now collapsed to, letting you see what they are. Looks like this: <!-- Healer -->. Any entries that don't have a comment should have one added, just copy/paste one and change the name. Have to expand the entry to see what it is, of course. :lol:

    Once that is done, just sort them alphabetically. If the file has groupings already, stick to them (UnitInfos does, as will most others). If you aren't sure how to group the file, or have an idea for a new grouping that would make it easier to read or to search in Worldbuilder, just post in this thread and I'll answer. :goodjob:

    Once the file is organized, all you need to do is zip it and upload it to this thread. I'll grab it from there. ;)

    EDIT: Alright, PromotionInfos is done. Uploading it here as an example. You can see that all promotions have a name comment, so when collapsed you can see what they are. Each group is separated by about 4 lines, makes it very clear when each group ends. View attachment CIV4PromotionInfos.7z



    Another way you could help:

    Concept sections for new civilizations. It's something I plan to do, but it can take 2-3 hours for each civ... More if you aren't familiar with them, which I'm not with some of the FF civs. :lol:

    Details about how to do this were posted a while back in the Download thread, but I'll repost:

    This is very true. If someone wanted to make new concept sections, I'd be more than willing to use them. Would go over it to make sure everything is there, but that's still faster than it would be otherwise as I can do that off the top of my head, really. ;)

    All that's needed is an entry in Assets/XML/BasicInfos/BasicInfos.xml.... Posted a dummy below, it's four lines.

    After that, it's just a text entry. A rather involved text entry to get the formatting, but text nonetheless. An example of my formatting is in XML/Text/MalakimPlus, under TXT_KEY_CONCEPT_MALAKIM_PLUS_PEDIA. Sticking to that basic formatting would be appreciated. ;)

    Included a list of basic formatting commands (These are all that I used in the malakim+ entry). If there are paired tags, the text effected must be placed between them. If the tag is NOT paired, then it either affects everything after it or is a one-time effect.

    Spoiler BasicInfos Code :

    Code:
            <ConceptInfo>
                <Type>CONCEPT_MALAKIM_PLUS</Type>
                <Description>TXT_KEY_CONCEPT_MALAKIM_PLUS</Description>
                <Civilopedia>TXT_KEY_CONCEPT_MALAKIM_PLUS_PEDIA</Civilopedia>
            </ConceptInfo>


    Spoiler Format Commands :



    • [\H1] - Creates a Header. Look at the entry in game to see what I mean, but it centers/bolds/up sizes whatever text is within the tag.
      [*][PARAGRAPH:2] - Forces the next text to be a few lines down. The 2 means two lines... As far as I can tell, at least. May well be for different formats of paragraphs, but 2 works. :lol:
      [*] [BOLD][\BOLD] - Self explanatory.
      [*][LINK=SPELL_SCORCH][\LINK] - Makes the text within the tags a link to whatever pedia entry is specified in the tag (The SPELL_SCORCH). Just use the xml entry for whatever you want it linked to. Leader, Spell, Promotion, Building, Unit, whatever... If it shows in the pedia, it works.
      [*][NEWLINE] - Goes to the next line. If you want a blank line, use two of these.
      [*][ITALIC][\ITALIC] - Self explanatory.
      [*][ICON_BULLET] - Makes a bullet, and indents the text.
      [*]:):):):):) - Indents text.




    There are a few more commands that could be used, but I hadn't needed them for the Malakim+ or Doviello+ sections. :lol:

     
  2. Grey Fox

    Grey Fox Master of Points

    Joined:
    Dec 19, 2001
    Messages:
    8,726
    Gender:
    Male
    Location:
    Sweden
    I can say that I've optimized a lot of the python code already. But not 100% done, especially with the testing. Also been writing a debug window which I am going to make a separate modcomp and share sometime.
     
  3. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Awesome. :goodjob: Yeah, my own work has been lagging, but I'm mostly fixing bugs and getting rid of stuff we don't need. The 'Reduce CPU usage' aspect was referring to your work. :p
     
  4. sylvain5477

    sylvain5477 Cerebrus father

    Joined:
    Dec 30, 2007
    Messages:
    752
    Ok to do one or two files first.
    Tell me which ones I should do and I will.
     
  5. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Any you'd like, honestly. The ones most in need of it are UnitInfos and SpellInfos, I think.
     
  6. sylvain5477

    sylvain5477 Cerebrus father

    Joined:
    Dec 30, 2007
    Messages:
    752
    OK, I do these two.

    What is your expected date of completion ? :)
     
  7. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Whenever. :lol:

    In the meantime I'll work on a few non-cleanup related things (Adding Mustevals, adding a new tag for improvements so I don't need to specify all forts in the Fort Commander code, and so on).
     
  8. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    You could rewrite the worldbuilder screen similar to how I rewrote the pedia screens so that it can be filtered/sorted based on selected rules. Be a bit of a pain to set up, but would make worldbuilder more enjoyable to use I imagine.

    Also, to display [tab], write it as [plain][tab][/plain]
     
  9. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    I could, but I don't think I will... Makes it EASIER to cheat. :lol:

    Also, I HAD written it that way, but the noparse command failed when I copy/pasted it. As did yours in the quote. :lol:
     
  10. lemonjelly

    lemonjelly Modding For Ethne

    Joined:
    Jan 5, 2008
    Messages:
    864
    Location:
    UK
    Can I say, please? Please Valk?

    And, I could have a go at a civ... :D

    Not sure what one, I'm not the best RiFE player...

    What ones do you need?
     
  11. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Alright, PromotionInfos is uploaded to the first post. If you open it up and collapse all entries, you can see that the groupings have about 4 lines of whitespace between them. Makes it very easy to tell them apart.

    Sylvain, Vermicious has a request for you about the UnitInfos file: Rather than grouping UU's with the base unit, he'd like a section for each Civ, with their UU's. I don't mind either way, so it's up to you. ;)

    LemonJelly, I really don't want to make WorldBuilder even EASIER, it's just a side effect of organizing it all.
     
  12. lemonjelly

    lemonjelly Modding For Ethne

    Joined:
    Jan 5, 2008
    Messages:
    864
    Location:
    UK
    Oh, yeah, I suppose so...

    So, what civs or features need information?
     
  13. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Any of the FF/RifE civs, or any FfH civs really. All of them eventually.

    For now, I'm going away to get drunk. Happy New Years!
     
  14. lemonjelly

    lemonjelly Modding For Ethne

    Joined:
    Jan 5, 2008
    Messages:
    864
    Location:
    UK
    Hmm... I'm not very good at all of them, but I could have a go at the Amurites...

    Going to have to see what's changed recently with them though...
     
  15. arcticnightwolf

    arcticnightwolf Emperor

    Joined:
    Jun 8, 2008
    Messages:
    1,301
    Location:
    Prague, Czech Republic
    If you are on doubt, go for the eyes. Or at least ask, What Would Ethne Do? :D :p

    /me wishes you happy new year 2010
     
  16. sylvain5477

    sylvain5477 Cerebrus father

    Joined:
    Dec 30, 2007
    Messages:
    752
    Too much IRC is bad for health :)
     
  17. black_imperator

    black_imperator Emperor

    Joined:
    Dec 4, 2005
    Messages:
    1,691
    do you need another file to be reorganized , Valkrionn ?
    ( And Happy new year too )
     
  18. sylvain5477

    sylvain5477 Cerebrus father

    Joined:
    Dec 30, 2007
    Messages:
    752
    You may take unitinfo if you wish as I started with spells and valkrion wanted both (it will go twice as fast this way) ?
     
  19. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    I would discourage using whitespace between sections. If you use the Macro function in Notepad++ (Which is AWESOME for bulk changes), then you need to have even spacing through the file, or you can't just macro the entire thing. Though ideally once you have the sorting done there won't be much need for any macro functions to be utilized, so there is that consideration.
     
  20. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Honestly, by the end of this EVERY XML file will be reorganized. :lol: Except maybe the Art files, not much call to do anything with them.

    So really, just pick any you want to do; If you do the unit file, Vermicious has a request:

    I don't mind either way, so it's up to you. Faster to organize UU's with the original unit, as some are already done that way, but it could be easier for modders to have all of a civ's units next to each other. Easier to balance everything.

    Honestly, I've never used the Macro function. :lol:
     

Share This Page