Aller au contenu

Photo

Has anyone been able to mod Toolset?


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

#1
Baaleos

Baaleos
  • Members
  • 1 322 messages
Has anyone been able to make any mod's or hacks that allow improvements to the default nwtoolset.exe


eg - Larger Compiler memory, 
        Less Runtime errors etc.


I recently ran into a crash that occured while trying to build all my scripts, it occured always on the same script.

To resolve it, I had to move the function call into a script of its own.

Was kinda annoying.

I was wondering if anyone had any success with modifying the nwtoolset.exe to improve it?

eg - Use an external compiler etc

#2
Calvinthesneak

Calvinthesneak
  • Members
  • 656 messages
I belive the PRC team has an external compiler. You'd probably have to ask XWarren about that one though.

#3
virusman

virusman
  • Members
  • 282 messages
No, there are no symbols for Toolset, and it's been compiled with Borland C++, making it harder to analyze and hook.

Modifié par virusman, 15 juin 2011 - 07:33 .


#4
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
Use the PRC compiler - it's a modified version of the bioware one, but far superior.
Linkage

I had a lovely post on the old boards talking about how to use it effectively, along with a link to our batch file. Perhaps that archive retrieval utility can find it. Here's the batch file, at least:

@ECHO OFF
set mask="%1*.nss"
CD C:\\NeverwinterNights\\NWN\\MODULES\\TEMP0
..\\..\\NWNNSSCOMP.EXE -cego %mask%
CD ..\\..
PAUSE

That, placed in your NWN folder, with nwnnsscomp.ext, will compile all script names matching whatever you type.

For example:

compile e

will compile all scripts beginning with 'e'. Very handy for compiling scriptsets.

Aside from batch compiling capability, it can handle far more identifiers than the bioware compiler, circular includes, and points out errors the bioware compiler misses.

Funky

#5
Shadooow

Shadooow
  • Members
  • 4 465 messages
Funky but I believe Baaleos do know PRC compiler. He just want override toolset to use PRC one instead default. Which is very reasonable and I want it too. The toolset script editor is very powerfull tool, no external text editor can replace it at all, so adjust toolset to use the PRC compiler when script compiling would be superior.

#6
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
From the crash he was describing, it doesn't sound like he was using the PRC to compile. In any event, I'm also interested in being able to have the toolset run nwnnsscomp.

Funky

#7
Baaleos

Baaleos
  • Members
  • 1 322 messages
I might make a C# Front end to the nwnnsscomp, just to make it more user friendly.

But I would have loved to have the ability to have it replace the default bioware compiler, and have the bioware toolset, use the 3rd party compiler.


The crash I was getting, I dont understand why it was crashing, no circular dependencies or anything.

Was just an onChat script, that called a function from an include file.

In order to fix it, I had to take the function call and the include out of the onChat script, and put into a separate script, and call it via ExecuteScript.

Annoyingly, the repeated crashes, corrupted my module, and I needed to revert a few versions back.
It made it so that some of my resources were not showing in pallette, even though they were in the temp.0 folder.

#8
PlasmaJohn

PlasmaJohn
  • Members
  • 95 messages
The stock Bioware compiler has certain limitations that nwnscomp works around. You probably got bit by #include explosion. Usually it's a good sign that whatever blew up is getting too complicated.

That said, nwnscomp optimizes much better than stock and since we've moved a large number of our common scripts to ResMan, we use this all the time.

By the way, the toolset was written in Delphi, not C++. This was the excuse given why there was no toolset for Linux or Mac users.

#9
virusman

virusman
  • Members
  • 282 messages
It's definitely not Delphi, but Borland C++ had the same problems with portability.
Anyway, I've found the function and will try to hook it to replace the compiler.

Modifié par virusman, 16 juin 2011 - 02:28 .


#10
Shadooow

Shadooow
  • Members
  • 4 465 messages

virusman wrote...

It's definitely not Delphi, but Borland C++ had the same problems with portability.
Anyway, I've found the function and will try to hook it to replace the compiler.

wohooo that would be totally awesome! Thanks virusman that you care :)

#11
PlasmaJohn

PlasmaJohn
  • Members
  • 95 messages

virusman wrote...

It's definitely not Delphi,

:blink: I stand corrected.  

#12
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages

virusman wrote...

It's definitely not Delphi, but Borland C++ had the same problems with portability.
Anyway, I've found the function and will try to hook it to replace the compiler.

*Cheers* :o

#13
Baaleos

Baaleos
  • Members
  • 1 322 messages
Ooooh,
Cool
I look forward to having a superior compiler working through nwntoolset, it would make things alot easier.

#14
virusman

virusman
  • Members
  • 282 messages
NWN Toolset Extender 1.0.0 + Compiler plugin
Required CRT: http://www.microsoft...ls.aspx?id=5555
Download: http://data.virusman...piler-1.0.0.rar
Install: Just unpack the files to your NWN folder and use NWNTX Loader.exe to launch the Toolset. The compiler will be switched seamlessly.
Thanks a lot to Skywing for the help and for his compiler library.

Modifié par virusman, 17 juin 2011 - 11:48 .


#15
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
Where's that <3 emoticon when I need it?

#16
Thayan

Thayan
  • Members
  • 244 messages
Very cool virusman. This is super speedy and for the first time in years my module scripts actually compile in the toolset. Thanks!

The only question/issue I have is that when structs are defined in include scripts, it appears to be unable to compile them. For example this declaration -
struct ItemProperty SF_GetItemPropertyToAdd(object oTarget, int nIPType, int nIPSubType, int nIPValue);

Returns this error -
sf_sockets_inc.nss(106): Error: Structure "ItemProperty" is undefined
Compilation aborted with errors.

Commenting out that line works, and the script still works too since the actual function implementation exists lower down in the include file, but I'm just wondering if that's maybe an issue, or if I'm just doing something wrong.

Modifié par Thayan, 18 juin 2011 - 12:02 .


#17
SkywingvL

SkywingvL
  • Members
  • 351 messages
Thanks Thayan, this is indeed a conformance issue with the standard compiler. I'll look at fixing this.

#18
SkywingvL

SkywingvL
  • Members
  • 351 messages
Thayan, please drop in the following compiler DLL in your NWNTX installation. This should fix the problem with forward declarations of structures being broken. You are still not allowed to place a structure that is only forward declared within another structure (as intended).

http://valera-ext.ny...CompilerDll.zip

I will post a new Advanced Script Compiler release (standalone compiler (NWNScriptCompiler.exe) + NWN2 toolset plugin) later on with the fix included.

In addition to the structure forward declaration problem, the following changes are in this drop versus the one virusman linked originally:

- Attempts to declare an identifier multiple times with incompatible symbol types now generate an error. Previously this would either silently be permitted or generate other unexpected behavior. The BioWare compiler allows this construct but does not handle it in a consistent or usable fashion so I am outlawing it.
- Attempts to declare a structure twice now generate an error, consistent with the BioWare compiler.

A complete changelog of issues resolved in the Advanced Script Compiler and the NWNTX compiler can be found with the Advanced Script Compiler release documentation, which is available here: http://nwvault.ign.c...ns.Detail&id=99

Source code for the compiler (based on Torlack's compiler with numerous fixes) can be found with the NWN2 Datafile Accessor Library distribution, which is periodically updated here: http://social.biowar...9/index/3116521

Modifié par SkywingvL, 18 juin 2011 - 02:54 .


#19
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
Wow, guys, fast work. Thanks!

Funky

#20
DM_Vecna

DM_Vecna
  • Members
  • 280 messages
amazing stuff, I cannot wait to download it.

#21
virusman

virusman
  • Members
  • 282 messages
New version with bugfixes and updated compiler dll:
http://data.virusman...piler-1.0.1.rar

Modifié par virusman, 18 juin 2011 - 08:44 .


#22
leo_x

leo_x
  • Members
  • 223 messages
Awesome! Thank you!

#23
Shadooow

Shadooow
  • Members
  • 4 465 messages

virusman wrote...

New version with bugfixes and updated compiler dll:
http://data.virusman...piler-1.0.1.rar

when i try to run it it throws an error that MSCVR100.dll is missing. I installed both SP3 and those libraries from vc++

#24
Thayan

Thayan
  • Members
  • 244 messages
Guys, the fixed version works beautifully for me now. Thanks both Skywing and virusman for doing this - and doing this so very quickly as well. Great work!!!

#25
Alex Warren

Alex Warren
  • Members
  • 179 messages

ShaDoOoW wrote...

virusman wrote...

New version with bugfixes and updated compiler dll:
http://data.virusman...piler-1.0.1.rar

when i try to run it it throws an error that MSCVR100.dll is missing. I installed both SP3 and those libraries from vc++


That file is inside VC++ 2010 package - I think it's the only file you need from that package because I didn't installed it, just extracted the library to nwn dir and new compiler works ;)