Jump to content

Noob scripting questions


CtMythic

Recommended Posts

I'm a total newbie to F3 script and had a few quick questions that weren't answered by the stickies or search bar, so if someone could help me it would be awesome.

All I've actually read/watched so far is a few basic tutorials and Bethesda's Youtube GECK tutorials, but I'm pretty competent in making .bat files for F3 so how hard can it be, right...? :rolleyes:

 

Basically, I want to do the following:

  • Create a weapon script that cripples all the enemy actors limbs on hit, then a few seconds after the hit kill the actor (similar to the Dart Gun script).
  • Create a script to attach to an item of clothing that has sets the player permanently in sneak and absolutely undetectable no matter what, also adding the Stealth Boy visual effect AND:
  • Be able to toggle the above effect on or off with a hotkey whilst wearing the item.

 

I've seen all these scripts implemented before, but rather than ask for them I'd rather learn how to make them, I've made quite a few very simple .bats for F3 and I want to move onto the harder stuff.

 

I would also like to know roughly where the game settings/configuration file is (Win7 64), or at least the file where I can steal the dart gun script to edit it as above and try stuff with.

 

Sorry for the kinda long first post, I'll drop a few quick sigs to the most helpful answers to say thanks. :smile:

Link to comment
Share on other sites

I'm a total newbie to F3 script and had a few quick questions that weren't answered by the stickies or search bar, so if someone could help me it would be awesome.

All I've actually read/watched so far is a few basic tutorials and Bethesda's Youtube GECK tutorials, but I'm pretty competent in making .bat files for F3 so how hard can it be, right...? :rolleyes:

 

Basically, I want to do the following:

  • Create a weapon script that cripples all the enemy actors limbs on hit, then a few seconds after the hit kill the actor (similar to the Dart Gun script).
  • Create a script to attach to an item of clothing that has sets the player permanently in sneak and absolutely undetectable no matter what, also adding the Stealth Boy visual effect AND:
  • Be able to toggle the above effect on or off with a hotkey whilst wearing the item.

 

I've seen all these scripts implemented before, but rather than ask for them I'd rather learn how to make them, I've made quite a few very simple .bats for F3 and I want to move onto the harder stuff.

 

I would also like to know roughly where the game settings/configuration file is (Win7 64), or at least the file where I can steal the dart gun script to edit it as above and try stuff with.

 

Sorry for the kinda long first post, I'll drop a few quick sigs to the most helpful answers to say thanks. :smile:

 

Once you have the GECK installed and create a new plugin - http://geck.bethsoft.com/index.php/Bethsoft_Tutorial_GECK_Setup, all the scripts and other assets will be available for you to look at, duplicate, modify, etc. because you new plugin will have the main game file (fallout3.esm) as its master. The scripts are in there. The Dart gun doesn't actually have a script. It has an 'enchantment' which is 1 or more 'effects' that affect stats of the target - in this case 1000 damage to leg limbs and some poison damage. But you could make a script for the gun and do what you stated above - cripple all limbs and kill the actor after a timer.

Link to comment
Share on other sites

Hi CtMythic,

 

The first thing you'll want to do to get started scripting for Fallout 3 is to download the GECK, if you haven't already. It's available, along with its single patch, from the GECK Wiki. The GECK will allow you to view and compile scripts. Its editor is pretty crap though, and I'd recommend using Notepad++ with a syntax highlighter.

 

For your first request, you'll want to make a new scripted object effect to apply to the weapon. Weapon type object effects apply their effects on the actor that is hit by the weapon, and you can use a ScriptEffectStart block to run some code as soon as the actor is hit. Use DamageActorValue to cripple the actor's limbs. In order to run code soon after the effect is applied, you'll need to use a ScriptEffectUpdate block, with a ScriptEffectElapsedSeconds check to trigger your code once a certain amount of time has passed.

 

It sounds to me like your other request could be greatly simplified if the effect was applied whenever the player is sneaking, rather than adding an extra hotkey, although if you still want to implement a hotkey you'll want to use FOSE's IsKeyPressed to check when the hotkey is pressed.

 

I don't know enough about the mechanics of detection to tell you how to make the player undetectable, but you could try artificially increasing their sneak skill. It would probably be easier to use a conditionalised actor effect instead of a script in order to implement an effect like this, possibly using a global variable as a switch. Just make sure that the effect is always on the player, and its conditions will make sure that it's active whenever appropriate.

 

I've tried to be vague enough to let you do the scripting yourself, but hopefully still helpful, but I don't know how much you do or don't know already about Fallout 3 scripting so I don't know how well I've managed it. Let me know if you need any clarification on what I've said, or any more help.

 

Cipscis

Link to comment
Share on other sites

Firstly, thanks to both of you for your replies.

 

I'll tackle the point both of you brought up re the GECK, I already have it and have spent quite a while editing Armour/Weapon forms and I think it's safe to say I have the basics down now, although I have pretty much only worked within the scope of the tutorials Bethesda posted on YouTube. I should really have mentioned this but thanks anyway.

 

Once you have the GECK installed and create a new plugin - http://geck.bethsoft.com/index.php/Bethsoft_Tutorial_GECK_Setup, all the scripts and other assets will be available for you to look at, duplicate, modify, etc. because you new plugin will have the main game file (fallout3.esm) as its master. The scripts are in there. The Dart gun doesn't actually have a script. It has an 'enchantment' which is 1 or more 'effects' that affect stats of the target - in this case 1000 damage to leg limbs and some poison damage. But you could make a script for the gun and do what you stated above - cripple all limbs and kill the actor after a timer.

 

Something else I should have mentioned is that I know the difference between an object effect and script. Editing object effects to any degree and adding them to weapons/armour etc causes an immediate CTD if I try to equip the weapon either through the console or Pip Boy, and so far I've been unable to do anything about it. (F3 GOTY Edition fully patched, legitimate copy so not a piracy thing. I've tried editing effects without any mods installed and it makes no difference, still a CTD. I'm bored of trying to fix this now, hence the move to scripts.) I just assumed each effect was an application of a script, rather than it's own "entity". This is actually the main reason I started looking into scripting, because object effects are not possible for me.

 

Thanks for the heads up about where to find the scripts though, definitely a help. I was looking in the Data folder for a .ini or something but it's been in front of me all along.

 

Hi CtMythic,

 

The first thing you'll want to do to get started scripting for Fallout 3 is to download the GECK, if you haven't already. It's available, along with its single patch, from the GECK Wiki. The GECK will allow you to view and compile scripts. Its editor is pretty crap though, and I'd recommend using Notepad++ with a syntax highlighter.

 

For your first request, you'll want to make a new scripted object effect to apply to the weapon. Weapon type object effects apply their effects on the actor that is hit by the weapon, and you can use a ScriptEffectStart block to run some code as soon as the actor is hit. Use DamageActorValue to cripple the actor's limbs. In order to run code soon after the effect is applied, you'll need to use a ScriptEffectUpdate block, with a ScriptEffectElapsedSeconds check to trigger your code once a certain amount of time has passed.

 

It sounds to me like your other request could be greatly simplified if the effect was applied whenever the player is sneaking, rather than adding an extra hotkey, although if you still want to implement a hotkey you'll want to use FOSE's IsKeyPressed to check when the hotkey is pressed.

 

I don't know enough about the mechanics of detection to tell you how to make the player undetectable, but you could try artificially increasing their sneak skill. It would probably be easier to use a conditionalised actor effect instead of a script in order to implement an effect like this, possibly using a global variable as a switch. Just make sure that the effect is always on the player, and its conditions will make sure that it's active whenever appropriate.

 

I've tried to be vague enough to let you do the scripting yourself, but hopefully still helpful, but I don't know how much you do or don't know already about Fallout 3 scripting so I don't know how well I've managed it. Let me know if you need any clarification on what I've said, or any more help.

 

Cipscis

 

Thanks a lot for the reply, that's given me a solid base to start on. I was looking at OnHitWith, but I had no idea of the actual format of the script originally and just at a glance at scripts in the GECK, I would have applied the script to myself aswell which would have been kinda annoying.

 

Specifically regarding the sneak effect, I was after something like what is in this Chinese Stealth Suit mod, where the "C" key toggles the stealth visual effect and sneak bonus even when standing, except I was interested in actually toggling sneak mode at the same time without having to crouch. It's probably a bit complicated for a beginner but it's still something I eventually want to learn.

 

Again thanks for the replies, and I'm a man of my word so if either of you want a sig then just ask. (Photobucket/deviantART)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...