Fallout 2 mod FO2 Engine Tweaks (Sfall)

Nice bit of housekeeping, Timeslip? Very good. ;)

Now that you've enabled the warning boxes, there's only one problem left standing between Cubik and I and an awesome food/drink mod:

We want to be able to 'charge' the famous V13 water flask with 'ammo' - except of course the 'ammo' represents water. Kindof like the motion scanner and stealth-boy that have use 'charges'.

Our goal is simple - you 'use' a well and it contains a script which 'charges' your water flask. So what we want to do is have the player be able to 'use' the flask, which will decrease the 'thirst' variable and use a 'charge' on the item.

Can you help with this, Timeslip? With another peice of engine magic or an sfall script? Or anyone else?
 
Josan12 said:
Can you help with this, Timeslip? With another peice of engine magic or an sfall script? Or anyone else?
No engine magic needed for that. It doesn't even need any particularly complicated scripting. :shrug:

You have two options:
1) script the water flask, which will prevent it from stacking, and have a file scope variable in the script to store how much water is in the flask.
2) accept that flasks are going to stack, and don't bother trying to keep track of how much water each individual flask contains, and instead keep a single value on the player, capped at x times the number of flasks in the players inventory, where x is however many 'charges' one flask is supposed to hold. You can then handle everything in the obj_dude script, or in a global script.

Personally, I'd go for option 2, because option 1 would just be asking to be bitten by the too many items bug.
 
We want to be able to 'charge' the famous V13 water flask with 'ammo' - except of course the 'ammo' represents water. Kindof like the motion scanner and stealth-boy that have use 'charges'.

Our goal is simple - you 'use' a well and it contains a script which 'charges' your water flask. So what we want to do is have the player be able to 'use' the flask, which will decrease the 'thirst' variable and use a 'charge' on the item.

Can you help with this, Timeslip? With another peice of engine magic or an sfall script? Or anyone else?

Surely all that could be done via a script? My head is fried at the moment, But i'll have a think. i'm sure there'll be a way.
 
Timeslip said:
Josan12 said:
Can you help with this, Timeslip? With another peice of engine magic or an sfall script? Or anyone else?
No engine magic needed for that. It doesn't even need any particularly complicated scripting. :shrug:

You have two options:
1) script the water flask, which will prevent it from stacking, and have a file scope variable in the script to store how much water is in the flask.
2) accept that flasks are going to stack, and don't bother trying to keep track of how much water each individual flask contains, and instead keep a single value on the player, capped at x times the number of flasks in the players inventory, where x is however many 'charges' one flask is supposed to hold. You can then handle everything in the obj_dude script, or in a global script.

Personally, I'd go for option 2.

option 2 could represent the charges,and script in a global script that if dude has > max charges,remove cur - max from dude inven,destroy bla bla

Nirran
 
Timeslip said:
2) accept that flasks are going to stack, and don't bother trying to keep track of how much water each individual flask contains, and instead keep a single value on the player, capped at x times the number of flasks in the players inventory, where x is however many 'charges' one flask is supposed to hold. You can then handle everything in the obj_dude script, or in a global script.

Personally, I'd go for option 2, because option 1 would just be asking to be bitten by the too many items bug.

Hmm. Yes, that's some good thinking. But there's some ... 'aesthetic' things i want to do:

a) i want the player to be able to 'use' the item and trigger an animation (which i've made):

cassswig0.gif


b) when they do so they can 'see' in a nice graphic way the 'ammo' on the flask going down (in the same way as the charges on the motion scanner, for example.

This makes the water a more .... visceral experience for the player rather than just keeping track of numbers.

But also - i have to confess i forgot there's lots of V13 flasks in the game and does kinda screw things up doesn't it (with the stacking and stuff)

I'd consider removing all V13 flasks from the game in that case (except for the holy one given by the elder at the begining of the game) to alleviate the problem.

Thoughts?
 
But also - i have to confess i forgot there's lots of V13 flasks in the game and does kinda screw things up doesn't it (with the stacking and stuff)

I'd consider removing all V13 flasks from the game in that case (except for the holy one given by the elder at the begining of the game) to alleviate the problem.

Thoughts?

Only attach the script to one flask at the beginning of the game. If you lose it during the game... you die!
 
Chris Parks said:
Only attach the script to one flask at the beginning of the game. If you lose it during the game... you die!

This is the truly fallouty approach, Chris! It's epic and mischevious at the same time :mrgreen:
 
Nirran said:
make a new item pro for the water,change its pic(simple color change maybe)

Nirran

This is an interesting idea.

You make like some items:

full
medium
low
empty

If you use "full", you get "medium", if you use "medium", you get "low", etc... if you use any of these on some water pipe or fountain and you get "full" item, etc.

Sounds very simple. Just delete old item and give player a "new" item. :)
 
Hmm. But how to visually show the flask is full?

It's a good idea, and makes the technicalities easier, but i'd prefer it if it were possible to treat the flasks just like motion scanners - that way everything 'fits in' better and the game can handle things like stacking in the way it normally would.
 
Josan12 said:
Hmm. But how to visually show the flask is full?
By each item having a different frm, obviously.

In any case, I think we've established that this can be done far more easily without resorting to any messy engine hackary, so this is all off topic for this thread.
 
Minimum System Required Macros to Define
Nirran, google whispered into my ear

Windows 95 and Windows NT 4.0 WINVER=0x0400
Windows 98 and Windows NT 4.0 _WIN32_WINDOWS=0x0410 and WINVER=0x0400
Windows NT 4.0 _WIN32_WINNT=0x0400 and WINVER=0x0400
Windows 98 _WIN32_WINDOWS=0x0410
Windows 2000 _WIN32_WINNT=0x0500 and WINVER=0x0500
Windows Me _WIN32_WINDOWS=0x0490
Windows XP and Windows .NET Server _WIN32_WINNT=0x0501 and WINVER=0x0501
Internet Explorer 3.0, 3.01, 3.02 _WIN32_IE=0x0300
Internet Explorer 4.0 _WIN32_IE=0x0400
Internet Explorer 4.01 _WIN32_IE=0x0401
Internet Explorer 5.0, 5.0a, 5.0b _WIN32_IE=0x0500
Internet Explorer 5.01, 5.5 _WIN32_IE=0x0501
Internet Explorer 6.0 _WIN32_IE=0x0560 or _WIN32_IE=0x0600
 
thank you,nope sure didnt even try,probably gonna drop support for everything prior to xp for int2ssl

Nirran
 
Timeslip said:
Removed from ddraw.ini, but which will still be recognised if they're readded:
DialogueFix, GainStatPerkFix, BlackSkilldexFix, SaveInCombatFix, SingleCore
What will their default hardcoded values be? (0 - ie off?)
 
killap said:
What will their default hardcoded values be? (0 - ie off?)
On, of course. Would be a bit silly removing a big pile of fixes otherwise. :P (As a caveat, until now they've always defaulted to off. It's only from 2.9 that the defaults have changed.)

They're just the options where there might need to be a reason for someone to turn them back off, but not a good enough reason to have the options cluttering up the ini for everyone else.
 
Timeslip said:
(As a caveat, until now they've always defaulted to off. It's only from 2.9 that the defaults have changed.)
Alright, that's why I was asking.

Timeslip said:
They're just the options where there might need to be a reason for someone to turn them back off, but not a good enough reason to have the options cluttering up the ini for everyone else.
Makes sense to me. :ok:
 
Timeslip, the installer in my mod searches the ddraw.ini for an ExtraCRC setting and replaces it with that from the hacked .exe, if it can't find one it will make one. Is this an okay way to do it? I have absolutely no idea how to script stuff, and don't want to pack an extra ddraw.dll for each major mod out there into the install.

Also, is it possible to make Melee Damage apply to Throwing weapons? Is it possible to change the way it's calculated, I'm thinking ST+AG/3 would be good? And, is it possible to make it affect both minimum and maximum damage instead of just maximum?
 
Magnus said:
Timeslip, the installer in my mod searches the ddraw.ini for an ExtraCRC setting and replaces it with that from the hacked .exe, if it can't find one it will make one. Is this an okay way to do it?
No, it's not. I added that option only for testing, and to give the mods that were already using altered exe's (e.g. the megamod) a chance to switch back to the default one. (*points at release post where I first talked about why sfall had switched to a crc check.*) As I've already mentioned a few times now, as of 2.8, the ExtraCRC option only works in the debug version of sfall.

Magnus said:
I have absolutely no idea how to script stuff
Code:
//hs_calcapcost.int
procedure start begin
  variable type;
  if hook_init == 0 then begin
    type:=get_sfall_arg;
    type:=get_Sfall_arg;
    if type==<whatever the values are for the unarmed attacks. iirc nirran did some research earlier in the thread.>
      set_sfall_return(<whatever ap cost you want>);
    end
  end
end

Magnus said:
and don't want to pack an extra ddraw.dll for each major mod out there into the install.
And neither would I want you to. :shock: Why on earth would you want to do that? My suggestion was for you to add a new option to the AmmoMod setting for your own mod.

Magnus said:
Also, is it possible to make Melee Damage apply to Throwing weapons? Is it possible to change the way it's calculated, I'm thinking ST+AG/3 would be good? And, is it possible to make it affect both minimum and maximum damage instead of just maximum?
Yes, script it. (a mixture of hs_combatdamage, and set_critter_extra_stat in a global script)
 
Back
Top