Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
That said, I was hoping to strip down your code into a more "vanilla" state, taking out Red Fog and some of the newer stat boosts. I tend to prefer modular over total conversion, and boosts only to the main stats like offense, mobility, will, and hacking (since hacking, while new, can be balanced around the median 5). Anyway, I changed the SecondWave script and .ini files around to use fewer stats and ignore redfog, and also to implement the old "Rollstat" function, but now I'm stuck with the listener. The way I understand it, it currently polls history for every statechange in "unit" whenever a new screen is initialized or focused, correct? Then, after, it checks the stats of the unit and if needed randomizes them? I was wondering if that could be refined to only notice on unit creation, removing some of the need for double checking, and some of the lag that'd be caused by checking each screen. (If I'm understanding correctly, which may not be true since I'm crud a scripting....)
Also, did you need to initialize in DownloadableContentInfo to get it running?
Thanks for any help, and again, sorry to bother you!
Anyway, since it's just an Ini tweak, nothing currently exists that lets you turn it off if the mod is installed. If you were to implement it the same way in your mod, it would need to be always on.
My mod is modular and that is my goal- to provide everything you want but keep them as seperate as i can, i try to minimize bulk of mods and intercompatibility problems along with the hassle of getting multiple mods maintained and looked after.
I'd love to see your code sometime,
Sincerely EladDv
As for modular, I mean it more in the sense of "these four mods work together, and are meant to be installed together, but in no way have to be." It's just easier (personally, for me) to do it at the startup screen rather than ini. Although, now that I think about it, it would be nice to turn off functionality while the mod remains installed...
As for my original code, it was pretty crappy. I was just trying to trick the game into considering rookie a rank that recieved a rankup, then modify the rankup for that level to actually use the old rollstat function. Theoretically, it should have worked, but wasn't triggering properly, leaving my troops with zero across the board (I set stats to 0 for testing). In the end, your code was far more intuitive, and actually had a history of working, so I just started cutting away at the redfog stuff and "excess" stats, and then implemented the old rollstat. (It's kind of nice because by not using your point system, you could get supersoldiers or plain terrible soldiers like in EW. Plus, adjustable intervals per stat). Honestly, the code at this point looks pretty similar, save for a changed class name or how/what it actually rolls. Now I just need it to actually do it's job. :P
And good luck with getting hidden potential into the actual code. I'm ok with the ini tweak, but the ability to turn off functionality while the mod remains installed could be really nice. That, plus I swear I never get my max rolls....obviously a bug of the current implementation. XD
The NCE class should be fine. I just cut it down a little. It should work. :/
class XComGameState_NCE extends Object Config(NCE);
//--------------- NCE Vars-----------------------------------
var Object SelfObject;
var int ValuesFromINI[9];
//----------- Config Vars------------------------------------
var config int Offense_high;
var config int Offense_low;
var config int Offense_Int;
var config int Mobility_high;
var config int Mobility_low;
var config int Mobility_Int;
var config int Will_high;
var config int Will_low;
var config int Will_Int;
var config int Hacking_high;
var config int Hacking_low;
var config int Hacking_Int;
function RandomStats(XComGameState_Unit Soldier)
{
local int Interval[4];
local int vfiLength; //Number of Values from InI
local array<int> RandomStats;
local int i;
local int currentStat;
Interval[0]=Offense_Int;
Interval[2]=Mobility_Int;
Interval[4]=Will_Int;
Interval[6]=Hacking_Int;
ValuesFromINI[0]=Offense_high;
ValuesFromINI[1]=Offense_low;
ValuesFromINI[2]=Mobility_high;
ValuesFromINI[3]=Mobility_low;
ValuesFromINI[4]=Will_high;
ValuesFromINI[5]=Will_low;
ValuesFromINI[6]=Hacking_high;
ValuesFromINI[7]=Hacking_low;
vfiLength=9;
for(i=0;i<vfiLength;i=i+2)
{
currentStat= EWRollStat( ValuesFromINI[i+1], ValuesFromINI, Interval );
RandomStats.addItem(currentStat);
}
Soldier.setBaseMaxStat(eStat_Offense,RandomStats[0]);
Soldier.setBaseMaxStat(eStat_Mobility,RandomStats[1]);
Soldier.setBaseMaxStat(eStat_Will,RandomStats[2]);
Soldier.setBaseMaxStat(eStat_Hacking,RandomStats[3]);
Soldier.setCurrentStat(eStat_Offense,RandomStats[0]);
Soldier.setCurrentStat(eStat_Mobility,RandomStats[1]);
Soldier.setCurrentStat(eStat_Will,RandomStats[2]);
Soldier.setCurrentStat(eStat_Hacking,RandomStats[3]);
}
function int EWRollStat( int iLow, int iHigh, int iMultiple )
{
local int iSpread, iNewStat;
iSpread = iHigh - iLow;
iNewStat = iLow + `SYNC_RAND( iSpread/iMultiple + 1 ) * iMultiple;
if( iNewStat == iHigh && `SYNC_RAND(2) == 0 )
iNewStat += iMultiple;
return iNewStat;
}
with the .ini as
[SWRNotCreatedEqual.XComGameState_NCE]
; Vanilla: eStat_Offense=65
; Vanilla: eStat_Mobility=12
; Vanilla: eStat_Will=40
; Vanilla: eStat_Hacking=5
Offense_high=80 ;Wiki range.
Offense_low=50
Offense_Int=5
Mobility_high=14 ;given a little extra range, closer to LW.
Mobility_low=10
Mobility_Int=1
Will_high=51 ;Should fall in the traditional 26-50 range from EW.
Will_low=25
Will_Int=2
Hacking_high=10 ;Median falls at base 5.
Hacking_low=0
Hacking_Int=5
See, really familiar, right? It's pretty much the same thing since I cut out all my code. They should work so long as their called, hence why I'm trying to fiddle with the listener.
You might want to come to
http://forums.nexusmods.com/index.php?/forum/3615-xcom-2-mod-talk/
me and a lot of great modders are there and they will always be happy to help, here it's not really optimal
I'll check out the Nexus forums while I'm at it. Thanks again for all the help.
Does your Reborn mod normally compensate for spawning squaddies? As in, if you get a squaddie from a quest reward or recruitment, does it upgrade from base stats or from random. Right now, I'm spawning from base stats, and I just thought I'd ask.
Ok, now back to trying to listen for char creation. :P