RifE 1.20 Ideas, Requests, and Feedback

Interesting concept involving cities and research...`
 
OK, so at first it didn't work. So I investigated, following the code path:

Spoiler :
Code:
bool CvDLLButtonPopup::launchChooseTechPopup(CvPopup* pPopup, CvPopupInfo &info)
{
    CyArgsList argsList;
    argsList.add(GC.getGameINLINE().getActivePlayer());
    long lResult=0;

    ...

    int iNumTechs = 0;
    for (int iPass = 0; iPass < 2; iPass++)
    {
        for (int iI = 0; iI < GC.getNumTechInfos(); iI++)
        {
            if (((iI == eBestTech) || (iI == eNextBestTech)) == (iPass == 0))
            {
                if ([COLOR=Red][B]player.canResearch((TechTypes)iI)[/B][/COLOR]):
                {
                    ...
                    iNumTechs++;
                }
            }
        }
    }
    if (0 == iNumTechs)
    {
        // player cannot research anything, so don't show this popup after all
        [COLOR=Red][B]return (false)[/B][/COLOR];
    }

    gDLL->getInterfaceIFace()->popupSetPopupType(pPopup, POPUPEVENT_TECHNOLOGY, ARTFILEMGR.getInterfaceArtInfo("INTERFACE_POPUPBUTTON_TECH")->getPath());

    gDLL->getInterfaceIFace()->popupLaunch(pPopup, false, ((iDiscover > 0) ? POPUPSTATE_QUEUED : POPUPSTATE_MINIMIZED));

    return (true);
}
Which basically means that at least one tech has to answer true to the canResearch function, whose code is below:

Code:
bool CvPlayer::canResearch(TechTypes eTech, bool bTrade) const
{
    bool bFoundPossible;
    bool bFoundValid;
    int iI;

    if(GC.getUSE_CAN_RESEARCH_CALLBACK())
    {
        CyArgsList argsList;
        argsList.add(getID());
        argsList.add(eTech);
        argsList.add(bTrade);
        long lResult=0;
        gDLL->getPythonIFace()->callFunction(PYGameModule, "canResearch", argsList.makeFunctionArgs(), &lResult);
        if (lResult == 1)
        {
            return true;
        }
    }

    if (![COLOR=DarkOrange][B]isResearch()[/B][/COLOR] && getAdvancedStartPoints() < 0)
    {
        return false;
    }

    if (GET_TEAM(getTeam()).isHasTech(eTech))
    {
        return false;
    }

    ...

    return true;
}
Which mean that isResearch function has to answer true if there not advanced point left, whose code is below:

Code:
bool CvPlayer::isResearch() const
{
    if(GC.getUSE_IS_PLAYER_RESEARCH_CALLBACK())
    {
        CyArgsList argsList;
        long lResult;
        argsList.add(getID());
        lResult = 1;
        gDLL->getPythonIFace()->callFunction(PYGameModule, "isPlayerResearch", argsList.makeFunctionArgs(), &lResult);
        if (lResult == 0)
        {
            return false;
        }
    }

[COLOR=Red][B]    if (!isFoundedFirstCity())
    {
        return false;
    }
[/B][/COLOR]
    return true;
}
Which means that if no city has been founded, the pop-up will never appear (as isReserach will always be false).

Could this check about city creation be removed ? :)

I tried to go around using activating the canResearch callback in python, which then worked, but the performance become catastrophic if I have to reproduce the filter of which tech to appear from C to python.
Moreover I don't see why you could not choose your tech before founding a city (with in the case of the new version of Tears for RifE will always happen, as no city will ever be founded :p)

Thank you in advance for considering this small change :)

I won't remove it (would be annoying for other civs), but what I CAN do is this:

Spoiler :
Code:
bool CvDLLButtonPopup::launchChooseTechPopup(CvPopup* pPopup, CvPopupInfo &info)
{
    CyArgsList argsList;
    argsList.add(GC.getGameINLINE().getActivePlayer());
    long lResult=0;

    ...

    int iNumTechs = 0;
    for (int iPass = 0; iPass < 2; iPass++)
    {
        for (int iI = 0; iI < GC.getNumTechInfos(); iI++)
        {
            if (((iI == eBestTech) || (iI == eNextBestTech)) == (iPass == 0))
            {
                if ([COLOR=Red][B]player.canResearch((TechTypes)iI)[/B][/COLOR])
                {
                    ...
                    iNumTechs++;
                }
[COLOR=Blue][B]                if(player.isMonstrous())
                {
                    iNumTechs++;
                }[/B][/COLOR]
            }
        }
    }
    if (0 == iNumTechs)
    {
        // player cannot research anything, so don't show this popup after all
        [COLOR=Red][B]return (false)[/B][/COLOR];
    }

    gDLL->getInterfaceIFace()->popupSetPopupType(pPopup, POPUPEVENT_TECHNOLOGY, ARTFILEMGR.getInterfaceArtInfo("INTERFACE_POPUPBUTTON_TECH")->getPath());

    gDLL->getInterfaceIFace()->popupLaunch(pPopup, false, ((iDiscover > 0) ? POPUPSTATE_QUEUED : POPUPSTATE_MINIMIZED));

    return (true);
}

Or something similar. Basically, add a new bool tag for civs, Monstrous. If a civ is monstrous, the value of NumTechs is increased by one, therefore bypassing all of those issues. I can add a similiar check to the other sections if necessary, but I'll start with just that one and hope. xD

One question, though... Do you happen to have an old version of the RifE source files, or did you get that from FF or the new upload? I don't actually have a version that doesn't have the new Alignment axis, which means you can't use it without at least one or two xml errors.
 
Actually, I can easily wait for your next full release as for now I went around by directly launching the full tech tree (less convenient but ok).

The ideal for me would rather be to add the following part, to only remove the city requirement for Monstrous civ, while keeping everything else:

Code:
bool CvPlayer::isResearch() const
{
	if(GC.getUSE_IS_PLAYER_RESEARCH_CALLBACK())
	{
		CyArgsList argsList;
		long lResult;
		argsList.add(getID());
		lResult = 1;
		gDLL->getPythonIFace()->callFunction(PYGameModule, "isPlayerResearch", argsList.makeFunctionArgs(), &lResult);
		if (lResult == 0)
		{
			return false;
		}
	}

	if (!isFoundedFirstCity()[COLOR="Blue"][B] && !isMonstrous()[/B][/COLOR])
	{
		return false;
	}

	return true;
}

EDIT: Forgot to thank you :) Done !
 
Thoughts on features....

Overall I greatly enjoy Rise from Erebus. By far my favorite mod for Civ4. Some features I particularly enjoy:

  • Mechanos civilization
  • Jotnar civilization improvements
  • Recent animal changes
  • AI Improvements
  • New resources (e.g. Salt)

There is only one feature I dislike: The frequency with which the game crashes to the desktop (CtD). It has been a very long time since I have been able to play a complete RiFE (or FFPlus) game because I eventually get to a point where the game is guaranteed to crash after I end the turn.

As much as I enjoy the many new features in RiFE, I would happily live with fewer features or a slower release cycle if there were at least a small chance I could complete an entire game without a CtD.

Just a thought....
 
When will the Pa... och ouch stop beating me!!!!

Actually that is good to hear, my RifE is crashing MUCH more than FF now.
 
I've had goblins who defeat wolves become wolf riders and it got me thinking. I haven't had a game last long enough to attack a dire hamster with a Ranger, but I'd sure love to see such an encounter produce a certain hero with a propensity for "butt-kicking for goodness." I'm not sure how much borrowing you guys can get away with (I seem to recognize some of the portraits from contemporary games and I'm pretty sure One of the leaders in RifE has background music from FF4).
 
I've had goblins who defeat wolves become wolf riders and it got me thinking. I haven't had a game last long enough to attack a dire hamster with a Ranger, but I'd sure love to see such an encounter produce a certain hero with a propensity for "butt-kicking for goodness." I'm not sure how much borrowing you guys can get away with (I seem to recognize some of the portraits from contemporary games and I'm pretty sure One of the leaders in RifE has background music from FF4).

Sadly, I'm missing the reference here. :p

We have an entire Era sound track from Silent Hill 4, actually. :lol: Adopt the Machinarum religion to listen to it. ;)
 
I read (possibly in this thread but I can't find it now) some complaints about the 'random' number generator in Civ and some less than random chains of bad results. I suggest a game option to set aside all fairly unlikely outcomes (any time one of two options has less than a 20% likelihood of occuring, whether its forest expansion, combat, resource discovery, or whatever is annoying people) and instead add those to a global counter. Whenever the counter passes 1. you're fairly unlikely event happens and the remainder rolls over for the next such event. This probably should include events that are very likely (80% or more), too, since the other half of the event is fairly unlikely.

20% is just a filler value here. The 15% wake-up chance for the Nilhorn giants is the sort of thing I'd want to include. Anyway, it's just a thought.
 
Minsc and Boo from Baldur's Gate. I'm sure a couple of the leaders (Auric Ulvan and the green orcish fellow in the Clan of Embers certainly) are images from Icewind Dale. Sorry, I just got nostalgic when I saw that hamster.
 
I read (possibly in this thread but I can't find it now) some complaints about the 'random' number generator in Civ and some less than random chains of bad results. I suggest a game option to set aside all fairly unlikely outcomes (any time one of two options has less than a 20% likelihood of occuring, whether its forest expansion, combat, resource discovery, or whatever is annoying people) and instead add those to a global counter. Whenever the counter passes 1. you're fairly unlikely event happens and the remainder rolls over for the next such event. This probably should include events that are very likely (80% or more), too, since the other half of the event is fairly unlikely.

20% is just a filler value here. The 15% wake-up chance for the Nilhorn giants is the sort of thing I'd want to include. Anyway, it's just a thought.

Do you know what's involved with making that kind of a change? :)
 
Minsc and Boo from Baldur's Gate. I'm sure a couple of the leaders (Auric Ulvan and the green orcish fellow in the Clan of Embers certainly) are images from Icewind Dale. Sorry, I just got nostalgic when I saw that hamster.

Psst he was being sarcastic when he said he didn't get the reference. Look at the Special ability of the Hamster. +1000% vs Floating eyes (you can't attack the eyes or if you do it serves no purpose they are not combat units)

For the record giving a ranger a special promo if they capture a dire hamster would be epic
 
Do you know what's involved with making that kind of a change? :)

Far too much for me to ever really put it in. :p

Psst he was being sarcastic when he said he didn't get the reference. Look at the Special ability of the Hamster. +1000% vs Floating eyes (you can't attack the eyes or if you do it serves no purpose they are not combat units)

For the record giving a ranger a special promo if they capture a dire hamster would be epic

Actually, I was not. The 'Go for the Eyes' thing is from FF... And even if I'd have put it in anyway, my source (Sad as this is) would have been from MegaTokyo. :lol:
 
oh no no no no no...

You HAVE to look into Boo the miniature Giant Space Hamster and his nutty Ranger from Baluder's Gate. I can not see how you made those references with out knowing their battle cry was "Go for the Eyes Boo, GO FOR THE EYES!"
 
Regarding the RNG, no I don't know how involved that would be. It wouldn't have to be every single random number call anywhere in the game, just the ones that folks are observing hangups on. You wouldn't want to use it for events, for example.

I'd be happy if one ranger who defeated a hamster got Boo's *squeak* replacing his usual acknowledgement (as I think we know Boo was always the brains of that operation). I'm not sure dire hamsters would still be around when rangers are available, so maybe a hunter might have to be eligible? If we were going all-out, I'd rename the qualifying unit Minsc, give him a hero promotion and a promotion "Boo" which whenever he dies, instead knocks him out for 20 turns and then returns him to your capital fully healed.

Or if you just want to run the joke, give that second promotion, call it "Minsc and Boo", upgrade to ranger, but don't give the hero promotion nor rename the unit. Maybe to keep this a limited possibility, rename one dire hamster as "Miniature Giant Space Hamster" and apply this circumstance only if it's defeated by a hunter or ranger belonging to a good player.
 
Hey there, finally got this working properly. Wonderful modmod!

Just an idea, perhaps Fort Commanders should start with the 'loyalty' promotion? It's a little odd to capture one and end up with an imobile unit standing next to the fort...
 
Hey there, finally got this working properly. Wonderful modmod!

Just an idea, perhaps Fort Commanders should start with the 'loyalty' promotion? It's a little odd to capture one and end up with an imobile unit standing next to the fort...


We could roll that into the influence promo. Seems logical.
 
A small suggestion/bug?: Currently, Triremes upgrade to Frigates when they should probably upgrade to Carracks, which come at Optics while Frigates are unlocked at Astronomy. A tier is being skipped here, like Warriors upgrading to Champions only and not Swordsmen.
 
Back
Top Bottom