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

Mod-Modders Guide to Fall Further

Discussion in 'Fall Further' started by xienwolf, Sep 25, 2008.

  1. hbar

    hbar Constant

    Joined:
    Feb 6, 2008
    Messages:
    1,307
    Location:
    Wisconsin
    That's odd, then, that the effect would be so much more pronounced in FF and RifE. Do these two mods have vastly more promotions to cycle through, or are they stored differently? The reason I stopped playing these two mods was because of this lag, and I never noticed it in vanilla FfH or Orbis.
     
  2. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    VASTLY more promotions, particularly in RifE. We've made use of Xienwolf's 'effect' promotions (invisible even on the unit) quite extensively. :p

    Number of promos in RifE - 904
    Number of promos in Orbis - 438

    Those are the only two I have installed on this machine, but that should give you an idea of why it has a bigger effect for us than for others. :p

    I'm just happy it's been fixed now, and will no longer cause so many issues. :goodjob:
     
  3. Sephi

    Sephi Deity

    Joined:
    Jan 25, 2009
    Messages:
    2,934
    FFH (and Wildmana) use the base BTS code, this modification only exists in FF and mods that copied it.
     
  4. Tholal

    Tholal Emperor

    Joined:
    May 19, 2009
    Messages:
    1,676
    I found a section of code that looked similar in FFH. I don't remember where offhand, but I can check later tonight. I commented it out in my mod and haven't noticed any adverse effects.
     
  5. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    It is possible, since I wrote the interface python for base FfH. But I modified it heavily afterward for FF, so this could just as easily be a piece I added after Kael implemented it, especially the promotion displays, as that is where I added the number overlays for stackable promotions (or was it promotions with duration... one of them has an overlay, hopefully not both...)
     
  6. Sephi

    Sephi Deity

    Joined:
    Jan 25, 2009
    Messages:
    2,934
    This is the code from BTS 3.19 and it is the same in FFH
    Code:
    		pPlot = CyInterface().getSelectionPlot()
    
    		for i in range(gc.getNumPromotionInfos()):
    			szName = "PromotionButton" + str(i)
    			screen.moveToFront( szName )
    		
    		screen.hide( "PlotListMinus" )
    
    Sure you can remove it, but since it is code from base BTS it could be that it is there for a good reason. So far only mods who modified this code had any issues with it.
     
  7. xienwolf

    xienwolf Deity

    Joined:
    Oct 4, 2007
    Messages:
    10,589
    Location:
    Location! Location!
    Ok, looked back at what Valk posted earlier in the thread and all that is different is the addition of the duration and quantity (so I did do both... ewww, maybe they are at least not the same color?).

    Quite possibly then the issue is just the sheer number of promotions.


    Valk: Make sure that you observe a promotion with duration and a stacked promotion to see that their numbers remain visible with that code chunk removed.
     
  8. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Well, the code may not exist in BtS; The same code I showed was in two places.

    But yes, the issue was just the number of promotions, brought on by you making them much more useful. ;)

    And that was the very first thing I checked. For both of them. Both work fine. ;)
     
  9. Valkrionn

    Valkrionn The Hamster King

    Joined:
    May 23, 2008
    Messages:
    14,450
    Location:
    Crestview FL
    Repost from a thread in the SDK/Python help forums, figure you may see this faster Xienwolf.


    Alright, we've had issues for a while in RifE (and FF, and WM afaik) with modular events. I've dug into it finally and found the cause.... But have no idea how to fix it.

    The issue is with a ReadPass2 function. I've tried to find other examples of this method in the code... But it only appears with Events, Techs, and Projects, and in each case involves the exact tags that screw up modular loading for those files. :lol: So, I really don't know what's wrong with it.

    Code:
    void CvEventInfo::copyNonDefaultsReadPass2(CvEventInfo* pClassInfo, CvXMLLoadUtility* pXML)
    {
    	bool bOver = pClassInfo->isForceOverwrite();
    	CvString cDefault = CvString::format("").GetCString();
    	CvWString wDefault = CvWString::format(L"").GetCString();
    
    	if(!m_piAdditionalEventChance)									pXML->InitList(&m_piAdditionalEventChance, GC.getNumEventInfos(), 0);
    	if(!m_piAdditionalEventTime)									pXML->InitList(&m_piAdditionalEventTime, GC.getNumEventInfos(), 0);
    	if(!m_piClearEventChance)										pXML->InitList(&m_piClearEventChance, GC.getNumEventInfos(), 0);
    	for (int i = 0; i < GC.getNumEventInfos(); ++i)
    	{
    		if(bOver || pClassInfo->getAdditionalEventChance(i)	!= 0)	m_piAdditionalEventChance[i]	= pClassInfo->getAdditionalEventChance(i);
    		if(bOver || pClassInfo->getAdditionalEventTime(i)	!= 0)	m_piAdditionalEventTime[i]		= pClassInfo->getAdditionalEventTime(i);
    		if(bOver || pClassInfo->getClearEventChance(i)		!= 0)	m_piClearEventChance[i]			= pClassInfo->getClearEventChance(i);
    	} 
    }
    As an idea of what it causes... It looks like it's loading maxints into the list. It does this even for completely unmodified events.




    http://forums.civfanatics.com/showthread.php?p=9488513#post9488513
     
  10. Brainjuggler

    Brainjuggler Chieftain

    Joined:
    Oct 1, 2011
    Messages:
    9
    I want cities to keep their buildings upon being conquered. How do I code this? I know it will mess up the AI but for another thread.
     
  11. Sephi

    Sephi Deity

    Joined:
    Jan 25, 2009
    Messages:
    2,934
    you need to set iConquestProb to 100 for all buildings (in the buildings XML)
     

Share This Page