Jump to content

Have a new mod idea


Khet

Recommended Posts

  • Replies 50
  • Created
  • Last Reply

Actually, after some initial testing, found a problem. Now, the combat check is working great. However, I adding perks (unhidden for testing purposes) to the player based on what weapon they have equipped. What's happening however, is that ALL of the perks are being added, EXCEPT for the one corresponding to the proper weapon. I've been testing with a Chinese Assault Rifle, and the AutoDamage perk isn't added, but the rest are. I dunno if it's just because FOSE is different and I've never worked with these before, or if it's because there's something I'm missing.

 

Edit: I take back what I said. I just checked again, initiating combat with a pistol this time. The Pistol, melee and Rifle perks are added, but not the Auto.

 

scn FOPRProfessionScript

ref equippedWeapon
ref equipType

Begin GameMode

set equippedWeapon to Player.GetEquippedObject 5
set equipType to GetEquipType equippedWeapon

;Check if player has a pistol equipped

If EquipType == 3 || 4 && Player.IsInCombat == 1
Player.AddPerk FOPRWeapExp
Player.AddPerk FOPRPistolDamage
	Else
Player.RemovePerk FOPRWeapExp
Player.RemovePerk FOPRPistolDamage
EndIf

;Check if player has a melee weapon equipped (all types)

If EquipType == 0 || 1 || 2 && Player.IsInCombat == 1
Player.AddPerk FOPRWeapExp
Player.AddPerk FOPRMeleeDamage
	Else
Player.RemovePerk FOPRWeapExp
Player.RemovePerk FOPRMeleeDamage
EndIf

;Check if player has a 2hand rifle or energy rifle equipped

If EquipType == 5 || 7 && Player.IsInCombat
Player.AddPerk FOPRWeapExp
Player.AddPerk FOPRRifleDamage
	Else
Player.RemovePerk FOPRWeapExp
Player.RemovePerk FOPRRifleDamage
EndIf

;Check if player has a 2hand automatic equipped

If EquipType == 6 && Player.IsInCombat == 1
Player.AddPerk FOPRWeapExp
Player.AddPerk FOPRAutoDamage
	Else
Player.RemovePerk FOPRWeapExp
Player.RemovePerk FOPRAutoDamage
EndIf

End

 

This is what I'm basing the EquipType numbers off of the FOSE website.

 

Weapon Type

0: HandToHandMelee

1: OneHandMelee

2: TwoHandMelee

3: OneHandPistol

4: OneHandPistolEnergy

5: TwoHandRifle

6: TwoHandAutomatic

7: TwoHandRifleEnergy

8: TwoHandHandle

9: TwoHandLauncher

10: OneHandGrenade

11: OneHandMine

12: OneHandLunchboxMine

Link to comment
Share on other sites

Yeah, I just slapped everything together just to see if I could get it running. I just can't figure out why they're adding the wrong perks, unless I've set something up wrong. Like I said, I've never used FOSE commands until now.

 

Edit: I did end up switching them to ElseIf commands, and now only the pistol is being added. I then switched the pistol with melee and only the melee was added. Only thing I can think of is my references aren't coming back properly.

Link to comment
Share on other sites

Heh, thanks. It's actually going to be an optional compliment to my Alternate Start mod. It brings back some of the feel from previous Fallouts though the main idea came from an old RPG called Arcanum (basically you chose histories that affected your starting characters)

 

I'll make those changes and see what happens.

 

Edit: GetBaseObject is returning a Syntax error. Reference function "GetBaseObject" requires explicit reference in quest script.

Link to comment
Share on other sites

Here's what you do:

 

1) Create a piece of armor and put the script you want to run. (add TOKEN to the end of the name so you know what it is)

2) Uncheck Playable and check Quest item

3) add it to the player

 

Now you can do what ever in the GameMode block or whatever block you plan on. The script will run as long as that TOKEN is in the player's inventory.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...