Aller au contenu

Photo

NSS, NCS, edit... I don't really get it! Any help?


  • Veuillez vous connecter pour répondre
37 réponses à ce sujet

#1
Vortaka

Vortaka
  • Members
  • 23 messages
Hi all,
     First, the problem...  I'll start easy!  I'm currently trying to edit/modiiy the variable constant in DAO (ex.: Venom duration).  I found the file, item_constants_h.  Easy to mod it's a txt like file, so no problem!  (You can even mod it in the toolset itself).  But how can I put it back in a file DAO will use?  Put it back in a NCS file (so that instead of modifying the original files (which is bad; that's the reason of the override folder anyhow), I'll just put the NCS in override and voila!

     But I still need to know how to put it in NCS...  After some research, I found the Neverwinter nss to ncs but...  Is it the same?  Can it be used in DAO?

Thanks!

#2
johnbgardner

johnbgardner
  • Members
  • 185 messages
The .nss is the text script file. The .ncs extension is the compiled script file. The toolset editor will automatically compile the script and put it in the override, I believe. At least I've had no issues with scripts I've created. Not recommeded, but if you want to change a script in the OC, you'll have to load the module, "check out" the script (like checking out a book from the library), edit it and check it back in, then save.

#3
CID-78

CID-78
  • Members
  • 1 124 messages
well that is a include file so you must basically recompile every script that include that script. that mean you must recompile the whole core and you still miss the specific scripts that uses it in the OC.

#4
Vortaka

Vortaka
  • Members
  • 23 messages
but...  Will it mod my original files or can I do it without any adverse effects?  I mean, if I Checkout (mod) and CheckIn, will it put itself in the override folder or simply destroy my original files (I don't want that!  I just want to test and tweak test a little).

#5
FollowTheGourd

FollowTheGourd
  • Members
  • 572 messages
From what I've gathered so far, the scripts in the database and the ones in the game files (archived in RIM format) are completely separate. At least they'd better be. Edit: the forum lost part where I said you'd still have to watch out for your override folder, and I don't think there's any easy "restore database from original game files" command (seems to mostly be nuke everything and start over, restoring your work from builder-to-builder files).

I haven't really gotten around to modifying the core scripts yet, but honestly, I don't see any way not involving workarounds to keep multiple versions of core scripts around so you could override them differently or work on a module that didn't change them at all. The resource names in the database are global, so I can't (AFAIK) have one version of ai_main_h_2 (and the files that include it) for one module but not another. Maybe I could duplicate it and rename the compiled file later so it overrides it that way... Also, I'm still a little unclear about exporting as I tend to either export too much or too little right now, but I thought that core/global stuff would still be common to all modules you create.

Modifié par FollowTheGourd, 08 novembre 2009 - 05:50 .


#6
johnbgardner

johnbgardner
  • Members
  • 185 messages
Doh, I didn't read closely enough. What I said is true, but you're trying to modify an include file, which could be included in virtually any script. That said, if all you are doing is changing a value of a constant and not adding anything significant, checking out the script, modifying it, and checking it back in should not break the OC, and I don't believe the modified script will go in the override folder since you are not creating a custom script of the same name. I could be wrong, though. None of us has enough experience yet to make truly definitive statements about the toolset mechanics.

#7
Vortaka

Vortaka
  • Members
  • 23 messages
The main thing is, for the heck of it, let's say I want to change the length of the "venom" potion.  I found the script (or the part of script) that does it in _Ability_Scripts/Items/item_constants_h.  In there, it's easy, just change the length (I hope anyway!).  From 60.0f (60 seconds) to let's say 120.0f (120 seconds).

Now, here comes the part I don't understand; the saving part!  (which is bad I don't understand!).  So, if you export it, it is now a nss file.  But what if I want to export it as a NCS file so that I can put it in my override folder, right?  (Well, that's how it worked in Neverwinter anyway).  Or, do I need to put it back in a rim or an erf (that, I don't know how!)

Any help would be apprecitated!

Modifié par Vortaka, 09 novembre 2009 - 12:52 .


#8
Vortaka

Vortaka
  • Members
  • 23 messages
help, anyone that could be, you're my only hope!
(ok, ok, that feels too much like star wars but hey... Also, check the post just before, it's exactly what I want to test!)

Modifié par Vortaka, 09 novembre 2009 - 12:55 .


#9
DeepImpact

DeepImpact
  • Members
  • 520 messages

Vortaka wrote...
Now, here comes the part I don't understand; the saving part!  (which is bad I don't understand!).  So, if you export it, it is now a nss file.  But what if I want to export it as a NCS file so that I can put it in my override folder, right?  (Well, that's how it worked in Neverwinter anyway).  Or, do I need to put it back in a rim or an erf (that, I don't know how!)


Anyone? Same problem!

#10
Eshme

Eshme
  • Members
  • 756 messages
I dont understand it either, last i changed a variable in every place i can think of and no change in game. So im wondering, how do you correctly put changes to work in game?



Are the scripts you see in the toolset up to date even? Because i read that the toolset didnt come with the game, and everything was just examples...

#11
DeepImpact

DeepImpact
  • Members
  • 520 messages
There are too many MODs, that are using these files, so somehow it must be going!

#12
Damar Stiehl

Damar Stiehl
  • Members
  • 333 messages
Here's how the cookie crumbles. This game makes you play "grown up developer", with all the accompanying doodads such as source control and compilation.

Now, I haven't yet sussed out how to create NEW scripts without screwing the pooch, but that's only because I promised myself I'd finish the game first before I get into the meat of modding. To edit an existing script, however:



1) Figure out where the change you want to make lives. It either lives in the script itself, or in one of the header files that the script includes. For example, the duration of Crushing Prison lives in the spell_constants_h.nss, but the spell itself is coded in spell_singletarget.nss. After you compile the scripts, spell_singeletarget.nss will turn into spell_singletarget.ncs and THAT is the file that goes into the Override folder.

2) In the toolset, check out the file you want to change (right click -> check out under Scripts in the Palette).

3) Find and make your change.

4) Check the file back in.

5) Compile the scripts. For god-only-knows-what-reason, the toolset is incapable of compiling just one script. Instead, it compiles ALL of them and dumps them into your override\\toolsetexport folder.

6) Go to that folder and find the script you changed. Remember, even if the change you made was in a *_h.nss file, the script that will apply this change is the .ncs where the actual spell/effect/ability was coded.

7) Move the .ncs file you found in Step 6 into your Override folder.

8) Delete everything else in the Toolsetexport folder.



This is a very crude way of doing things, but that's the best I know right now; it is how I made my

"Nerfs Be Gone" mod, and it works... so far, anyway ;)

#13
DeepImpact

DeepImpact
  • Members
  • 520 messages
Thanks a lot, that could solve one week of despair :)

I´ll try tonight.

#14
Eshme

Eshme
  • Members
  • 756 messages
Cool makes sense. I have to try out step by step

#15
DeepImpact

DeepImpact
  • Members
  • 520 messages

5) Compile the scripts. For god-only-knows-what-reason, the toolset is incapable of compiling just one script. Instead, it compiles ALL of them and dumps them into your override\\\\toolsetexport folder.
6) Go to that folder and find the script you changed. Remember, even if the change you made was in a *_h.nss file, the script that will apply this change is the .ncs where the actual spell/effect/ability was coded.


What means "Compile"???
I exported with and without dependencies, but no NCS is created just nss-Files!

#16
Damar Stiehl

Damar Stiehl
  • Members
  • 333 messages
There's a "compile" option in the menu, or you could press F7. Script editor must be open for this to work, I think.

#17
DeepImpact

DeepImpact
  • Members
  • 520 messages
The good news:
Posted Image

The bad news:
Posted Image

I tried to define the constants directly in the mainscript, but then even this one wouldn´t compile anymore:
Posted Image

Modifié par DeepImpact, 15 décembre 2009 - 04:34 .


#18
stzehn

stzehn
  • Members
  • 26 messages
you can not compile _h scripts because they are include files. They will be icluded by the compiler  when included in that specific script header like that "#include "events_h"" if you want  to change anything within an include script an want that to produce anything, you hav to change the _h script and compile every script that includes your _h script (aka include .

#19
DeepImpact

DeepImpact
  • Members
  • 520 messages
I can´t believe it! I´m a professional programmer for about 10 years - but I´m failing with this ******-toolset!

Okay, I repeat what u should do:
1) Add the values in the 2da_constants_h (and check-in)
2) Add the values in the ability_summon_h (and check-in)
3) Include these two in the main-script (which is done already)

#include "utility_h"
#include "ability_summon_h"
#include "2da_constants_h"
#include "plt_ranger_revised_plot"

4) Compile the main-script (ranger_revised_handler.nss)
5) Export (folder ranger_revised) without dependencies
6) Take a look in the bioware/dragon-ages (somewhere should be *.ncs-files)

Right?

Modifié par DeepImpact, 15 décembre 2009 - 08:23 .


#20
stzehn

stzehn
  • Members
  • 26 messages

Okay, I repeat what u should do:
1) Add the values in the 2da_constants_h (and check-in)
2) Add the values in the ability_summon_h (and check-in)
3) Include these two in the main-script (which is done already)

#include "utility_h"
#include "ability_summon_h"
#include "2da_constants_h"
#include "plt_ranger_revised_plot"

4) Compile the main-script (ranger_revised_handler.nss)
5) Export (folder ranger_revised) without dependencies
6) Take a look in the bioware/dragon-ages (somewhere should be *.ncs-files)

Right?


Most of it :D You should check if your changed include files (ability_summon_h and 2da_constants_h) are included somewhere else (which is for sure so) and check if any of those scripts need to be recompiled as well (which depends on what you are trying) if they do not get in conflict with your script or what you are trying you may leve them unchanged.

#21
DeepImpact

DeepImpact
  • Members
  • 520 messages

stzehn wrote...
Most of it :D You should check if your changed include files (ability_summon_h and 2da_constants_h) are included somewhere else (which is for sure so) and check if any of those scripts need to be recompiled as well


How do I know if they need to be recompiled? But I think I check all the involved script for anything regarding summons.

stzehn wrote...
(which depends on what you are trying) if they do not get in conflict with your script or what you are trying you may leve them unchanged.


I´m trying to build a new line of summon-skill for the ranger. In the 2da_constants_h I´ll define the new IDs from the ABI_BASE.xls, like:

const int ABILITY_TALENT_SUMMON_RAT         = 450001;

In the ability_summon_h I define to constants to use the SUMMON.xls:

const int SUMMON_TYPE_RAT = 5;  

        case ABILITY_TALENT_SUMMON_RAT:
        {
            nSummon = SUMMON_TYPE_RAT;
            nVFX = 0 ;
            UI_DisplayMessage(oCaster,UI_MESSAGE_NOT_AT_THIS_LOCATION);
            break;
        }


Maybe I should insert something as a kind of DEBUG-MESSAGE?

Modifié par DeepImpact, 15 décembre 2009 - 01:45 .


#22
stzehn

stzehn
  • Members
  • 26 messages

Craig Graff wrote...

Many of the core files are included
quite widely. To find a list of the files which directly reference a
header scriptyou can right-click on the script and choose Properties,
then click on the Referenced By tab. This isn't terribly useful in the
case of effect_combat_h, since it is included by include files.

The
best way to find the full list of affected resources might be to export
the header file with dependent resources, then filter plot files and
header files out of the list (starting with an empty
packages/core/override folder helps with this).


This should help you with your Problem as well B)

#23
DeepImpact

DeepImpact
  • Members
  • 520 messages
****!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Nothing!

I`ll write down what I have dnne:

1) Open Toolset
2) Manage Module > Open Ranger_Revised
- Click ALL
- Search "2da"
- Check out 2da_constants_h.nss
- Modify file

const int ABILITY_TALENT_SUMMON_RAT = 450001;
const int ABILITY_TALENT_SUMMON_MABARI = 450002;
const int ABILITY_TALENT_SUMMON_DRAGONLING = 450003;



- save file
- check in file
- try to compile (failed)

- search "summon"
- Check out ability_summon_h
- modify file (line 122)

const int SUMMON_TYPE_RAT = 5;
const int SUMMON_TYPE_MABARI = 6;
const int SUMMON_TYPE_DRAGONLING = 7;


and line 548

case ABILITY_TALENT_SUMMON_RAT:
{
nSummon = SUMMON_TYPE_RAT;
nVFX = 0 ;

break;
}

case ABILITY_TALENT_SUMMON_MABARI:
{
nSummon = SUMMON_TYPE_MABARI;
nVFX = Ability_GetImpactLocationVfxId(nAbility) ;

break;
}

case ABILITY_TALENT_SUMMON_DRAGONLING:
{
nSummon = SUMMON_TYPE_DRAGONLING;
nVFX = Ability_GetImpactLocationVfxId(nAbility) ;
UI_DisplayMessage(oCaster,UI_MESSAGE_NOT_AT_THIS_LOCATION);
break;
}

Look for ability_summon_h - References
- Compile talent_pet.nss
- Compile spell_modal.nss

Export 2da_constants_h without dep.
Export ability_summons_h without dep.



Open ranger_revided_handler.nss (mainscript)
- Check out
- modify file:

#include "ability_summon_h"
#include "2da_constants_h"
#include "plt_ranger_revised_plot"
#include "utility_h"

- Save
- Check out
- Compile file!
- Export without dep.
- Generate XML
- Generate Manifest

- Delete packages/core/override/toolset

- Close toolset



And nothing more! Didn´t function

Modifié par DeepImpact, 16 décembre 2009 - 02:17 .


#24
Eshme

Eshme
  • Members
  • 756 messages
Is there no way to read a tutorial to get a idea how it works? I wanna try to change someting and i know exactly where, but i dont get the effect in game. It is a include file.

I would add some simple debug messages into the scripts,so i can see where it is, but sadly i havent learned how to create something like that, i just wanna change a value thats all.

#25
DeepImpact

DeepImpact
  • Members
  • 520 messages
UI_DisplayMessage(oCaster,UI_MESSAGE_NOT_AT_THIS_LOCATION);



For example!!!! But that didn´t work for me.



Could some PRO please take a look before I quit modding for good???

http://dl.dropbox.co...AO/ranger_r.rar



Includes the build-to-build-data, the GDAs and the XLS.