Fallout 2 mod FO2 Engine Tweaks (Sfall)

Discussion in 'Fallout General Modding' started by Dude101, Jul 30, 2007.

  1. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    :? I don't get it. *confused*

    Great avatar Mr lizard!
     
  2. Dravean

    Dravean Where'd That 6th Toe Come From?

    478
    Mar 6, 2005
    Heh, I don't know, it's kind of amusing watching these dudes duke it out and attack each other in broken English.
     
  3. Alray

    Alray First time out of the vault

    50
    May 10, 2007
    Lexx, Jesterka, no comments... Kids...

    Timeslip and others - sorry for everything :)

    New button code:
    Code:
    static const DWORD newbuttaction1=0x00443C98;
    static void _declspec(naked) newbuttonaction() {
    	_asm {
    		mov eax,dword ptr ds:[0x510944];
    		cmp eax,3;
    		jz end_cppf;
    
          mov edx,1;
    		mov eax,0x2B7;
    		call newbuttaction1;
    end_cppf:
    		mov eax,0x502074;
    		retn;
    	}
    }
    
    static const DWORD newbutt1=0x4d87f8;
    static const DWORD newbutt2=0x419c88;
    static const DWORD newbutt3=0x419188;
    static const DWORD newbutt4=0x45e440;
    static const DWORD newbutt5=0x419c88;
    static const DWORD newbutt6=0x419188;
    static const DWORD newbutt7=0x4d8260;
    static const DWORD newbutt8=0x45e440;
    static const DWORD newbutt9=0x45e440;
    
    
    static void _declspec(naked) newbuttonfct() {
    	_asm {
    
    		mov ebx,0x451990;
    		mov edx,0x451988;
    		call newbutt1;   
    		xor ecx,ecx;     
    		push +0x0;       
    		mov edx,0x1D6;  //number from intrface.lst for button-up  
    		mov eax,0x6;     
    		xor ebx,ebx;     
    		call newbutt2;   
    		mov ecx,0x518f28;
    		xor ebx,ebx;     
    		xor edx,edx;     
    		call newbutt3;   
    		mov ds:[0x59d3fc],eax;                                      
    		test eax,eax;                                            
    		jnz nbtnj1;                                            
    		mov edx,0xffffffff;                      
    		call newbutt4;                           
    		mov eax,edx;                             
    		add esp,+0x4;                            
    		pop ebp;                                 
    		pop edi;                                 
    		pop esi;                                 
    		pop edx;                                 
    		pop ecx;                                 
    		pop ebx;                                 
    		ret; 
    nbtnj1:
    		push +0x0;                               
    		mov edx,0x1D5;     //number from intrface.lst for button-down                         
    		mov eax,0x6;                             
    		xor ecx,ecx;                             
    		xor ebx,ebx;                             
    		call newbutt5;                           
    		mov ecx,0x518f2c;                        
    		xor ebx,ebx;                                       
    		xor edx,edx;                                       
    		call newbutt6;                                     
    		mov ds:[0x59d400],eax;                                
    		test eax,eax;                                      
    		jnz nbtnj2;                                      
    		mov edx,0xffffffff;                    
    		call newbutt9;                         
    		mov eax,edx;                           
    		add esp,+0x4;                          
    		pop ebp;                               
    		pop edi;                               
    		pop esi;                               
    		pop edx;                               
    		pop ecx;                               
    		pop ebx;                               
    		ret; 
    nbtnj2:
    		push +0x0;                             
    		push +0x0;                             
    		push eax;                             
    		mov edi,ds:[0x59d3fc];                    
    		push edi;                              
    		push +0x2F;   //returns this value when press                         
    		push -0x1;                             
    		push -0x1;                             
    		push -0x1;                             
    		mov ecx,0x29;   //button width                      
    		mov ebx,0x13;  //y-position                       
    		push +0x13;      //button height                   
    		mov edx,0x20E; //x-position                        
    		mov eax,ds:[0x519024];                    
    		call newbutt7;                         
    		mov ds:[0x518f24],eax;                    
    		cmp eax,-0x1;                          
    		jnz nbtnj3;                          
    		mov edx,eax;                           
    		call newbutt8;                         
    		mov eax,edx;                           
    		add esp,+0x4;                          
    		pop ebp;                               
    		pop edi;                               
    		pop esi;                               
    		pop edx;                               
    		pop ecx;                               
    		pop ebx;                               
    		ret; 
    nbtnj3:
    		
    		mov ebx,0x451990;
    		retn;
    	}
    }
    
    
    .......
    
    // skill button x-position
    SafeWrite8(0x0045DC04, 0x3F);
    // adding new button
    SafeWrite8(0x0045DA30, 0xE8);
    SafeWrite32(0x0045DA31, ((DWORD)&newbuttonfct) - 0x0045DA35);
    // new button event (replace original '/' event. I have no time for something else)
    SafeWrite8(0x004437e9, 0xE8);
    SafeWrite32(0x004437eA, ((DWORD)&newbuttonaction) - 0x004437ee);
    SafeWrite8(0x00443838, 0x90);
    SafeWrite32(0x00443839, 0x90909090);
    // replace map-button y-position with characters-button y-position
    SafeWrite8(0x0045dd40, 0x4e);
    SafeWrite8(0x0045de1e, 0x28);
    
     
  4. Alray

    Alray First time out of the vault

    50
    May 10, 2007
    M005193b8 (+1) - current slot for save\load
    M005186c0 - memory offset. From here start array with GVARs in memory
    M005186c4 - total number of GVARs
    M0051ddfc - number of cities
    M00672e64 - when = 1 - dude moving by the car
    M00518f78 - = 0 - active left hand, if = 1 - right
    M00510944 - combat flag (3 - combat is active)
    M00510940 - counter. total rounds in the combat
     
  5. Wasteland Ghost

    Wasteland Ghost Still Mildly Glowing

    296
    Sep 20, 2005
    Lexx, Alray, please, stop this! I deeply respect both of you, but you are behaving like a kids! Don't be jealous. It's a great breakthrough in FO2 modding and now it's available to every modder. It is something we've alvays dreamed of: make our own interface adjustments. And now, when we have this possibility, let's congratulate each other and be happy.

    PS Lexx, to be honest this is an insult not for Alray, but for me. I was consulting dozens of modders, but I never, never leaked any information from them to the community. Never. Alray was working on this several month. Alone. Of cource he's insulted by such unjustified hostility. Please, I beg you to understand the situation and stop this. Any of this. We can speak personally if you want and resolve any vagueness left.
     
  6. Mr.Wolna

    Mr.Wolna Vault Senior Citizen

    Nov 15, 2007

    heyy, with this you can build a savegame converter, to use fallout 2 slost ind Killaps RP(wheN you do not enter a new map already, right?)
     
  7. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    I didn't said this and I also avoided to say "xy has stolen" like you can see in my first post to this. The reason for this was that I haven't had any possibility to prove this and I also don't say something about others when I am not absolutely sure about it.

    Alray's work is a great thing and a pretty good and usefull improvement that I would love to see ingame and also would use for my own mods too and so on.

    But then again, we worked hard on our stuff just to see, that it wasn't worth the time now. Depressing, like I already wrote.

    Also we made some things different. I am not 100% sure about this, but maybe Helios can take a second look at it and can give improvement suggestions or something like this. But I don't know, how much active he will be in the next time.
     
  8. Wasteland Ghost

    Wasteland Ghost Still Mildly Glowing

    296
    Sep 20, 2005
    Doubts can be insulting too. ;) But I wasn't really insulted. I understand your position. I hope everything is perfectly clear now and we can leave this behind and move forward. ;)
     
  9. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    So, how is the actual status on this? I am also wondering if it is possible to add and or change the position of new buttons without editing the source code and compiling sfall again and so on.
     
  10. Alray

    Alray First time out of the vault

    50
    May 10, 2007
    I can write. This isn't a problem. The real problem is in events when pressing new button. This must be only in source code of sfall. Or maybe some default event...

    I hope you understand my broken english.
     
  11. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    Yes, your english isn't bad. ;)

    Couldn't it be possible to create a new *.ini file with the needed button informations? Sfall could then check the *.ini files in a kind of loop for it's entrys. It would be a bit like the MrFixit recipes.

    Some needed informations would be:
    - x coordinate
    - y coordinate
    - position of the button (main menu, game interface, worldmap...)
    - button image down
    - button image up
    - sound when click
    - hotkey button (if needed?)
    - function that will be called <- this only in sfall? No possibility to "outsource" it?

    That's what comes into my mind when I think about it.
     
  12. Shiozaki

    Shiozaki It Wandered In From the Wastes

    147
    Jul 29, 2006
    Feel like i'm on a MUGEN site.........
     
  13. Mario_Dweller

    Mario_Dweller It Wandered In From the Wastes

    153
    Apr 9, 2004
    Hi. These lines are in ddraw.ini

    ;World map travel time percentage modifier
    ;Modifies how fast in game time passes while you're moving around the map screen without affecting encounter rate
    ;The pathfinder fix needs to be turned on for this to work
    ;100 is normal speed, 0 stops time from passing
    WorldMapTimeMod=100

    then

    ;This will change the physical speed at which you move across the map
    ;Set to 0 to leave at the default. (i.e. limited by vwait in windowed mode, or by processor speed in fullscreen)
    ;If set to something other than 0, it enforces a maximum fps on the world map screen.
    ;Changing this to something other than 0 is not recommended if you've already applied a world map speed patch to your fallout exe.
    WorldMapFPS=0

    ;Set to 1 to enable Ray's patch to make world map encounter rate independent of your travel speed
    WorldMapEncounterFix=1
    WorldMapEncounterRate=5


    and


    ;Obsolete, but can still be used if you know what it does.
    ;WorldMapDelay=0


    --


    Especially this "Changing this to something other than 0 is not recommended if you've already applied a world map speed patch to your fallout exe." Is there some exe patch ?

    I've found this settings in ddraw.ini in fallout-2-unofficial-fan-patch
    WorldMapDelay=16777216

    I've combined it with
    WorldMapEncounterFix=1
    WorldMapEncounterRate=5

    but travelling is very slow on slow computers(everything else is as fast as normal)

    Is there some real patch to make world map speed independent of computer speed?
     
  14. taag

    taag Still Mildly Glowing

    274
    Aug 30, 2008
    Is it possible to add support for larger critters (whose base is more than 1 hex) into engine such as robots from fallout tactics? Currently there's some clipping...
     
  15. Kanhef

    Kanhef Vault Dweller

    793
    Sep 2, 2007
    There are several multi-hex critters in Fallout already: brahmin, radscorpions, deathclaws, centaurs, mole rats, Mr. Handys, security bots.
     
  16. taag

    taag Still Mildly Glowing

    274
    Aug 30, 2008
    How did they deal with clipping issues?
     
  17. Darek

    Darek is currently unavailable

    Jan 7, 2008
    In the mapper you can set one of the flags for a critter to multihex.
    There's also an option to set body type to biped, quadruped or robotic. Have you tried any of those?
     
  18. Jaesun

    Jaesun First time out of the vault

    52
    Jul 12, 2005
    One suggestion for future versions, could you possibly put in a Sound Acceleration setting in SFall? I *ALWAYS* forget to change this setting when playing fallout, it would be nice if you could include this setting?

    For example have all 4 settings:

    0 - No Acceleration
    1 - Basic Acceleration
    2 - Standard Acceleration
    3 - Full Acceleration

    And have the default be 1. You then could stop all the "OMG! All the endings fly by so fast I can't see them!" threads.

    Dunno, if this is possible, but would be nice.
     
  19. alexweiln

    alexweiln First time out of the vault

    41
    May 29, 2006
    Did anyone figure *how many* G_VARS can actually be possible in Fallout2?
    I do have a serious problem with scripting as I already have posted, maybe this could cause the trouble? Because I never rewrote global.h not even yet, just added and added and... you get what I'm say'en.

    Yes i confess, I am hoplessly lazy.
     
  20. taag

    taag Still Mildly Glowing

    274
    Aug 30, 2008
    Didn't try this one. I'll report back...