FO2 races mod (play as human, mutie or ghoul)

Wild_qwerty

Sonny, I Watched the Vault Bein' Built!
*EDIT*
I just renamed this thread from "Is it possible to restrict weapon use by script?" to better explain what this mod is about.

The method in this mod could also be used to start the game as a child and then grow into an adult as well so you could probably take the path that beth has with fallout 3 and 'choose' how you will look when you grow up.

*END EDIT*

Is it possible to restrict weapon use by script? I really need a way to restrict the player from using certain weapons by script. I have an idea on how I can allow the player to play fallout 2 as either a super mutant or a ghoul. But since a super mutant doesn't have the animations for using a pistol then I either need to make the animations (urgh!) or restrict access so he cant use them so it wont crash the game. I cant explain away the reason why by saying his hand are to big to use a tiny little pistol etc...
 
I have no idea at the moment what the code is, but couldn't you modify the obj_dude script critter procedure? Specifically, if the player attempts to put a weapon in his/her hands that can't be used, then something in the critter procedure could just remove it from the player's hands and place it back in inventory, while displaying a message that says that such-and-such item can't be used?
 
The dude_obj script or its critter_p_proc procedure won't affect the weapon (or the dude, respectively) while you're in the inventory screen, meaning you won't be able to remove it from there. Exiting the screen will continue the dude's script, but I believe the game engine will be faster than the script and call for the new animation set (the non-existing one with the pistol), thus crushing the game.

You could make a frame dummy animation set (6 directions) and name it as pistol animation using the known naming conventions. This way the game won't crash, the dummy animation will be called by the engine after exiting the inventory screen and (in the end) the script will "disarm" the dude in 1/10 seconds, setting the default (existing) "unarmed" animation for him/her.

At least in theory :roll:
 
lisac2k said:
The dude_obj script or its critter_p_proc procedure won't affect the weapon (or the dude, respectively) while you're in the inventory screen, meaning you won't be able to remove it from there. Exiting the screen will continue the dude's script, but I believe the game engine will be faster than the script and call for the new animation set (the non-existing one with the pistol), thus crushing the game.

Yeah, I was thinking about that (that's why I started to put in a comment about a quick fade in/out). But, won't the crash only be triggered if the player tries to move? I noticed this in the Megamod: if the player equipped the fork (which was supposed to use the knife animations), then the player would become invisible. Only after trying to move did the game crash. A script would definitely be faster activating after the inventory screen than a person trying to move...
 
MIB88 said:
Only after trying to move did the game crash. A script would definitely be faster activating after the inventory screen than a person trying to move...
True, just tested it... Now, let me see if the weapon could be "removed" easily...
 
thanks guys this sounds promising so far. The same would apply to armour as well, for example a super mutant cant use power armour.

I didnt think of using a dummy frame for a filler until the script removes it again, thats a good idea.

On a slightly different note, I wanted to beef up the player if they are a mutant, since they are unable to use small guns and melee weapons they should be stronger and such. So I was also thinking of apon the player transforming from a human into a Mutie that the could receive some bonus hit points,strength and constition points.
I was also thinking giving them a couple of perk levels in toughness some they have a natural damage resistance.


I've asked timeslip to add support for a few options to change the characters default model so I don't need to use the loader or hex edit the fallout2.exe to do this.

http://www.bethsoft.com/bgsforums/index.php?showtopic=736370&st=40&gopid=10927746&#entry10927746

I'm not sure if it's possible but are we able to trigger a change in the sfall program by script, so if the player chooses to get dipped then he gets the model changed, else he stays as a human. That way its possible to play as either a human or a mutant with the one mod.
 
OK, just tested the "disarm" part of the script, it works fine. Here's the code for 10mm Pistol, just put it in the critter_p_proc in obj_dude.ssl script:
Code:
   if (obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_RIGHT_HAND)) == PID_10MM_PISTOL) or
      (obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_LEFT_HAND)) == PID_10MM_PISTOL) then begin

      inven_unwield(dude_obj);

   end
This has to be done for EACH weapon you're about to restrain from further using (and for armors, but you need to add INVEN_TYPE_WORN check first, since it's different slot).

I believe timeslip added a new scripting function(s) regarding player stats... Gotta dig it out, it's somewhere on this forum or in his docs. Just gimme a second, OK?
 
Yeah, I saw that over at the other forum. Hopefully Timeslip can come up with something. And being able to mutate in such a way in the game would be a really cool feature.
 
Found it. Excerpt from his fallout engine tweaks readme.txt file:
v1.6d
>Added some extra script functions. (get_critter_base_stat, get_critter_extra_stat, set_critter_base_stat and set_critter_extra_stat)
>Fixed parameter checking bug with set_pc_base_stat and set_pc_extra_stat
>get_pc_base_stat and get_pc_extra_stat now return 0 if an invalid stat id is given

v1.6c
>Fixed bug with get_pc_base_stat and get_pc_extra_stat returning incorrect values

v1.6b
>Added some extra script functions. (get_pc_base_stat, get_pc_extra_stat, set_pc_base_stat and set_pc_extra_stat)
I remember the original pc_stat scripting functions were really buggy, so I guess timeslip fixed it eventually. Wild, you'll need the new compiler made by timeslip in order to use the new scripting functions...
 
err hmm might be a little beyond me just now, but I'll take a look. The main thing is that I'm trying to find out if this is actually possible (which it sounds like it is).

So this pretty much sounds like its possible to do then, so i might as well start working on it. Be warned I'll try and rope you guys in for scripting, but if its fairly much the same script for each weapon then I could do the leg work on that.

So if i understand correctly, it's just that one script that needs to be changed.

obj_dude.ssl - remove access to weapons & armour

I'm thinking i'll also need to change the script that runs around the time the player gets the vaultsuit to give the player stat increases etc...

at this stage I'm not worried about writting new lines of dialog for people to comment about you being a big ugly mutant.

*EDIT*
okay I decided to use my brain a little and actaully read through the change log for the newest version...

Code:
v1.13
>You can now change the start and default player models
>You can now change the hardcoded in game movies
>Added new script functions (set_dm_model, set_df_model, set_movie_path)

anyway, looks like we can now script a base model change, so I can start making my "Path of the Mutant" mod :)
 
"Path of the Mutant" mod
Well, yes, you'll need to change only obj_dude.ssl script and compile it using the new compiler. In that script you can set the moment when the player should change its appearance, restrict the weapons/armors and raise/lower some stats (I'm not sure about lowering using new sfall functions, probably possible).

I'd help you gladly with this, but I'm overloaded until 21. September... Sorry.
 
Thats cool, I've got a bit of work I can do to start it out. I also need to write it up exactly what needs to be changed.

Where do I get the uncompiled versions of the script that needs to be changed?
 
Where do I get the uncompiled versions of the script that needs to be changed?
Fallout 2 Mapper comes with those. The dude's script (obj_dude.ssl) is located in the "scripts/main" folder.
I also need to write it up exactly what needs to be changed.
Good, do that first. Then we can see if the whole thing is possible or not (or if there are some workarounds).

I'll be around ;)
 
Okay the first part of the mod will be this:

Player goes through temple of trials like normal and then gets to the very last part of of the temple where he talks to Cameron.

1) Cameron has added dialog that talks about the different paths the player can take to fullfill his roll as the chossen one. And how each path is different.
- Path of the vault dweller, take up the VD's suit and carry along in his memory
- Path of the mutant, the VD recognised that the super mutants had a great strength and new he wouldnt always be around to pretect the village so he stored some FEV in the caves (magic mutie juice). This was only to be used in a time of great crisis to create a champion for the tribe.
- Path of the Ghoul, To be acessed, but will be along the lines of a big dose of radioactive stuff the VD found in necropolisis

Anyway that just a quick text change to give some story behind the option of playing as either a human or a mutie.

The player then goes on to fight or talk to camaron out of fighting, either way you get past him.

2) Now you open the door, but instead of the movie playing the door open into a new room. The room contains the vaultsuit, a well of FEV, and a box of Radioactive stuff. Now of the scripting part the player will use one of these items and depending on which item he uses it will set the the following variables as per the sfall program:

Takes the Vault Suit
set_dm_model = hmjmps
set_df_model = hmjmps
set_movie_path movie4 = vsuit.mve
set_obj_dude_race = human

Drinks the FEV
set_dm_model = mamtnt
set_df_model = mamtnt
set_movie_path movie4 = fevdip.mve
set_obj_dude_race = mutant
-awards bonus strength & constitution and toughness perks etc...

Eats the Rad stuff
set_dm_model = naghul
set_df_model = naghul
set_movie_path movie4 = eatrad.mve
set_obj_dude_race = ghoul
-awards bonus perception & constitution and rad risistance perks etc...

The bonus perks are to balance out not being able to use some weapon types, we could probably script it so that the player gets more perks are certian levels as per game balance.

3) The obj_dude script will now disable certian weapons and armour from use depending on what weapon Frms are available for each critter.

if (obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_RIGHT_HAND)) == PID_10MM_PISTOL) or
(obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_LEFT_HAND)) == PID_10MM_PISTOL) then begin

inven_unwield(dude_obj);

end

4) The script now triggers the vsuit quest complete and the engine should now change from the starting critter model to the new default model and play the new 'vsuit' movie.

This should be enough to get the game going and prove that this works.

5) The future....
- update shop scripts etc to supply either ghoul, mutant or human armour based apon which race the player is or use the teamx "mr fix it" mod to use a tool on an armour to change it for each race eg: use a tool on a human leather armour and turn it into a mutie leather armour :)
- new dialogs etc for being a mutie...

anyway there enough work in the first part. I'll start doing the art work and stuff soon, by then I'll need some help with the scripting.
 
Haha, you krazie kiwis!

Most of this looks like possible and not very hard to do (thanks to timeslip's additions)... I could help, but you'll have to wait a week or two, sorry.
 
That's cool mate, it should give me time to plan out everything.

Also looking at the sfall thread here at nma, it sounds like we could use sfall to use some of the unsued perks, so if we can modify them it should be fine.

Race Perks:

Path of FEV
You have been infected with the Forced Evoluntionary Virus, and have transformed into a huge super mutant. You are stronger and can take more punishment. Though due to your large size you can no longer use some items.
+2 Strength
+2 Constitution
+25% damage resistance (not sure if we can do this)

Path of Radiation
You have been exposed to a high dose and Gama-X radiation, this has transformed you into a Ghoul.
+1 Intelligence
+1 Perception
+50% radiation resistance (not sure if we can do this)
+50% poision resistance (not sure if we can do this)
+ Other stuff ...

Though we dont have to do this with perks, it might look nicer. For started we should just start with the Super Mutant and then go back to do the Ghoul options.

*EDIT*
I've just finished the first version of the design doc for this, which should make it a little bit easier to plan what we need to do. I dont think there will be that many scripts that actaully need to be changed, but what do I know? Anyway I'll see what I can do about the art items for the fev pool etc..

Design Doc PDF Format
http://rapidshare.com/files/56287162/Fallout_2_-_Races_Mod.pdf

Design Doc in MS Word/Open Office Format
http://rapidshare.com/files/56287733/Fallout_2_-_Races_Mod.doc

Please read the design doc and make any suggestions you can think of.
 
Nice! I'd skip the part with mapping and new GFX, since the player can make a choice during the conversation with Cameron and the consequences should be visible after exiting the temple right away (scripted event).
 
okay, that probably easier. I was just thinking that if the player kills Cameron then they are poked.
 
Maybe a stupid question.
Is this for Fallout 2 or for Fallout Tactics ?

It does nothing in F2.
And wenn i google (Fallout2 races mod) i find it on this site in the category Fallout tactics, so...
 
It's for Fallout 2 and it's still in development. The races mod you found in the FOT section is a totally different mod, for Fallout Tactics.My isn't that a suprise!
 
Back
Top