• Announcements

    • Ashal

      SITE MOVED - IN READ ONLY MODE   12/08/2015

      Please use http://www.loverslab.com moving forward. Site has been restored to a previous version, and this one placed into a read-only mode. This is available for a limited time so users may reference/copy content that has been lost in the transition. This will no longer be accessible by December 22nd, 2015.

Archived

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

tomm434

Can't edit the mod anymore

Hello guys! I'm working on mod right now and I've got a problem - When I edit mod all the result scripts don't work. For example,I changed the dialogue a bit and things that should happen after dialogue don't happen.  If it helps, there is the file


http://www.loverslab.com/files/file/812-falloutttw-questoverhaul/


 WHat could be the possible reason for this behaviour?


0

Share this post


Link to post

GECK dialogue scripts are problematic. Take a look in the scripting 101 thread, there is a lot of good info in there. You don't need to read every post, but start at the beginning.


 


Personally I do all my scripting outside of dialogue whenever possible. Any GameMode block (so, quests) and effect spells can't run during dialogue (but usually before or after is fine). Object scripts with OnAdd can run during dialogue, and I use this in Soliciting. My dialogue scripts are limited to additem, startquest, and setting quest variables.


 


I'm assuming you have the GECK set up properly to use NVSE?


0

Share this post


Link to post

GECK dialogue scripts are problematic. Take a look in the scripting 101 thread, there is a lot of good info in there. You don't need to read every post, but start at the beginning.

 

Personally I do all my scripting outside of dialogue whenever possible. Any GameMode block (so, quests) and effect spells can't run during dialogue (but usually before or after is fine). Object scripts with OnAdd can run during dialogue, and I use this in Soliciting. My dialogue scripts are limited to additem, startquest, and setting quest variables.

 

I'm assuming you have the GECK set up properly to use NVSE?

 

I'm afraid I can't do additional scripts because I'm editing already existing quests.

can you give me a link to that thread you mentioned? I can't find it.

 

yes, GECK uses NVSE and I installed GECK Power up

0

Share this post


Link to post

You can still add additional scripts.


 


What exactly are you trying to change, and to what? Post the code.


0

Share this post


Link to post

Thanks ChainsasGeek for the helpful thread.


Thanks Odessa for the tip(After not working on my mod for a week I forgot that I should launch GECK through NVSELoader and not by GECK icon). Now everything works good.


 


Actually now I have another question. - is there any way to mod variables? I want to add 1 to global variable each time character has sex with raider.


I tried "set aaaraiderssex to +1" and it didn't work obviously.  Is there a command for my needs?


0

Share this post


Link to post

The syntax is not 'set xxx to +1' but 'set xxx to xxx + 1' and you may access a variable declared in  a quest so the final may be something like this :



set myquest.myvariable to myquest.myvariable + 1

1

Share this post


Link to post

Or with NVSE 4+, you can just do this:



let myquest.myvariable += 1

Global variables are generally discouraged... so consider using a quest var instead


1

Share this post


Link to post

Or with NVSE 4+, you can just do this:

let myquest.myvariable += 1

Global variables are generally discouraged... so consider using a quest var instead

 

Then I'll have to edit all results scripts and dialogue conditions again. Ehhmm...  What's wrong with Global Variables?

0

Share this post


Link to post

 

What's wrong with Global Variables?

 

 

They are global :D

 

More seriously, it is a bad idea in any language to use variables that can be acceded by any part of the code cause when there is a problem you don't know whch part of code did do the problem.

 

As FNV langage is not object oriented you can't really protect them (or it demands to create 2 functions that do controls and are the only one which can read/write them)  and clearly (at least on this point) Papyrus will be better.

 

Note: I don't see in NVSE any functions permitting to write global variables like Skyrim have.

0

Share this post


Link to post

 

 

What's wrong with Global Variables?

 

 

They are global :D

 

More seriously, it is a bad idea in any language to use variables that can be acceded by any part of the code cause when there is a problem you don't know whch part of code did do the problem.

 

As FNV langage is not object oriented you can't really protect them (or it demands to create 2 functions that do controls and are the only one which can read/write them)  and clearly (at least on this point) Papyrus will be better.

 

Note: I don't see in NVSE any functions permitting to write global variables like Skyrim have.

 

 

haha ok, I will change all the global variables to just quets variables.

 

Just in case, I hope there is nothing wrong with me adding additional dialogues to already existing quests instead of making a new one and placing all dialogues in it? Because it is more convenient  - when quest ends - dialogues do not longer appear.

 

0

Share this post


Link to post

 

Note: I don't see in NVSE any functions permitting to write global variables like Skyrim have.

 

 

They are part of the vanilla GECK, go to 'Gameplay' (top bar) -> 'Globals'. They can be optionally constant.

 

----

 

One thing you can do, that you might have missed:

 

Sexout has 3 global constants 'Vaginal': 1, 'Anal': 2, 'Oral': 3. This means you can do this, for readability:

int SexType

 

set SexType to Oral

 

if SexType == Vaginal

     ; do something

elseif SexType == Oral...

    ; etc

endif

But, don't create new globals without a good reason, and don't create many if you do, for the reasons strec explained.

 

-----

 

 

It is better to add rather than modify game assets to reduce various conflicts, so if it isn't much more work to do it that way, you should. I think in this case it is fine though, since changing the default quests is the whole point.

0

Share this post


Link to post

 

 

Note: I don't see in NVSE any functions permitting to write global variables like Skyrim have.

 

 

They are part of the vanilla GECK, go to 'Gameplay' (top bar) -> 'Globals'. They can be optionally constant.

 

 

 

I know we can modify globals with geck, was talking to modify them by code, I don't know how to do.

 

edit: ok thanks.

0

Share this post


Link to post

You can modify them the same way as any other variable so long as they aren't constant.


 


let GameDaysPassed += 5


 


It works, but doing that one will kill the player from hardcore mode and may make actors do weird things (disappear etc), I think because of packages/AI updates. So, you have to be careful (I increment this during Another Kick in the Head dreams). If you create your own it should be safe though, I used them in wear and tear V1 (my first FO mod), before switching it to quest vars.


0

Share this post


Link to post