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

Platy World Builder

Discussion in 'Civ4 - Mod Components' started by platyping, Mar 27, 2013.

  1. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Another example is the FreeBonus granted by a building. If it's written in the WB file as per your CvWBDesc.py, the game will double it because it applies it automatically for the building in the first place.
     
  2. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Test this.
     

    Attached Files:

  3. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,341
    Location:
    Kael's head
    I just tried merging that with my modmod, and was about to test it, but decided to run it through a python debugger first to see if WinMerge messed anything up (as it often does when it comes to indentation).

    It found a problem in what would be line 1376 of your version, where you have have an unmatched close parenthesis after the keyword continue.
     
  4. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Reuploaded. Dont have time to reinstall civ to fix this :)
     
  5. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    I tested it and here are my limited comments (could not test everything...):

    - FreeBonus: seems OK, retains the correct number in WB and in game afterwards. Then changed a number from 1 to 3 and it retained 3.

    - StateReligionBuilding: is not recorded in WB (Civic: Organized Religion). However, seems OK in game.

    - CoastalTradeRoute is doubled in WB file when you write it in WB.

    - Same for EnemyWarWeariness.

    I'm still of the opinion that only a building, a civic etc should change these modifiers. I don't see the point in changing these in a WB save as they will not be documented in game. Personally, I prefer to disable all these in the py file.
     
  6. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Version 4.14



    1) Units + Cities:
    Ability to kill/skip units/cities of similar type/domain/etc on same plot/area/global

    @Magister
    I chose not to use your full list style so modders can add more to the list such as unit AI types, special unit type etc if they like without worrying about the space.

    @Xyth
    Tried and tested, removing barb units do not cause crash

    2) CvWBDesc
    A) Fix double counting bug for special effects
    B) Added a new line in WB Save files to determine whether to load special effects.
    C) Remove ability to save Barb Reveal plots, as it causes crash when loading a Platy WB Save file without using Platy WB. (backwards compatibility)
     
  7. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,341
    Location:
    Kael's head
    I almost decided to use drop down menus like that myself, but then decided I'd rather be able to see more information about the targeted units/cities at a glance.

    In your release, one could easily kill a hundred units thinking he was only killing a couple.

    The label should not just say "All" but at least something like "All 6" if that is the number being targeted. (There does not seem to be much need to show "all" buttons if the list contains less than 2 cities/units.)

    I'm thinking it might be better if those filters did not apply only to the units/cities targeted for the kill/skip all commands, but also controlled what would be displayed in the tables.

    It would also be nice if the drop down menu to select a player had an "all players" option.


    Since finding the selected unit in a long list of units in order to mousoever it and see details like its unit AI or area can sometimes be troublesome, I'm thinking it might be good to display that same help information above the table next to the map or make it a mouseover for the map too.
     
  8. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    1) I thought of adding the numbers to save you the trouble of merging when I looked at your screen. But considering that the same style is also used at other pages like Units and Promotions, I decided to keep it simple for now, if not the other pages may have to change as well.

    2) Using the filters to control the tables sounds reasonable. Needs some work to make it similar to Promotions again.

    3) I thought of adding the Player/Team/All options when I imported the codes from Promotions, but again decided to keep it simple first, as this patch is mainly to fix the CvWBDesc and it is too long since I done coding :D

    4) Helptext area. Doable.

    P.S.
    I will wait a few days first to gather input about the current patch, whether all bugs fixed or other suggestions reasonable.
     
  9. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Thank you for the new version :) (but I won't be able to test it before the middle of next week).
     
  10. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Version 4.14b



    1) Added Player/Team/All

    2) Filters now affect items shown in Tables directly. Thus, Kill/Skip All will remove all items in respective tables, there is no need of numbers to inform user how many items are gonna be killed.

    3) Added hover data for selected item.
    P.S. Building/wonder list is not shown here, as it involves tedious loops.

    4) Removed Area ID and XY columns, since now you can filter via Area directly.
    Replaced with more meaningful columns to sort.
     
  11. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,341
    Location:
    Kael's head
    Thanks Platyping! It looks great.

    I do think it would be better though if the city data displayed here included the cities' x & y location and area id too, like it does for units.


    I still think it would be better if the "All" commands stated the number of units included in all too. That would probably just require using len(lUnits) and len(cities), and moving the button placement to placeCurrentUnit(self) or sortUnits(self) and placeCurrentCity(self) or sortCities(self) so the lists are defined already.


    I'm thinking there are more useful categories I should include for FfH2 based mods (city revolution indices, unit durations, defensive strengths, has casted status, etc), but it shouldn't be too hard for me to do that and there would be no point in including those for the main version.
     
  12. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Keldath has an interesting idea here.

    I think that it could be useful sometimes to be able to randomize the features on a map as you do for bonuses. The default should be "false" of course.
     
  13. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Quick Fix:
    Added None checks for situations where players have no cities or units.

    As for all new features, put on hold till there are sufficient ones to make a new version.
    Don't wish to update bit by bit.
     
  14. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,778
    Location:
    israel
    hey platy- my addition works :) i have tested it, and its ok.

    the file is in the link isenchine provided.
    its based on your latest uuuu.
     
  15. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,341
    Location:
    Kael's head
    Do you expect to release another World Builder update within the next few days?

    Tholal said he hopes to release a new MNAI update within the next week, and would like my latest WorldBuilder in time to incorporate it.

    I have a version ready to give him based on your last update, but it would be nice if I could incorporate new features too.
     
  16. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Not likely, there isn't much things to add anyway.
     
  17. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    I'm coming back to CvWBDesc and to this particular line of code:
    Code:
    			for item in pWBTeam.bVassalOfTeamList:
    				gc.getTeam(item).assignVassal(iTeamLoop, true)
    As per this recent thread, you can't precise in a WB file that a vassal is a peace (or a free) vassal, it always assumes capitulation.

    I have the case in a scenario where I would indeed want to specify that a vassal has not surrendered in a war.

    Do you think we could change this and how?

    Thanks in advance!
     
  18. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    We can, though this is a default WB assumption.
     
  19. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    Version 4.15

    CvWBDesc
    1) Vassals can now be defined as "Free" or "Cap"
    Code:
    VassalOfTeam=0, Type=FREE
    Pre 4.15 Saves will all assume as "Cap", though you can manually adjust the Save file.

    2) Certain Inputs are no longer case sensitive, such as Randomise locations.
    False, FALSE or false all work.

    P.S.
    I didn't bother with Random Features, as Features Generation is far more complicated.
    Certain Features are hard coded to spawn after normal generation, depending on Mapscripts.
    In particular Forests, Jungles and Ice.
     
  20. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    Thank you! :king:

    PS: it's getting more and more complicated! :D
     

Share This Page