Jump to content

Home

Script Building Tool?


rictus135

Recommended Posts

Scripting is tricky to learn and are fiddley to do even for experienced scripters when they are doing lots of them.

 

But could a script builder be built to take some of the gruntwork out of the process? There are so many tools out there that seem far more complicated it seems it could be possible to a programming simpleton such as myself.

 

Think of the interface as sort of a cross between a .uti editor and .dlg editor. Each branch of the tree represents one set of script functions.

 

1. A simple script such as making a npc walk over to the pc would have only one branch, in this branch would be the script function nodes. Such as "getobjectbytag", "getlocation", "assigncommand". You would just need to select these generic functions from a list. Perhaps even name them in a more user friendly manner for noobs (like me!)

 

The nodes would then be used to detail the specifics of each function. In the case of "getobjectbytag" you would just enter the .utc filename.

For "assigncommand" you would select the neccassary command in this case "ActionForceMoveToLocation", and the target which would just be the PC.

Each variation could be included in a list within the nodes; such as PC, npc or XY location as the target.

 

2. More complicated scripts that check for conditionals with different results would be placed in multiple branches.

 

If you wished for an NPC to become hostile to a darksider, but talk to a lightsider you would need to build two branches. The root would make a check to determine your alignment, the branch would then have a True/False check.

 

3. Very complicated scripts that make multiple checks with varying results would then be have branches within branches, like a .dlg. Certain portions could even be copied if there are multiple ways to achieve the same end, saving you the effort of having to create two identical branches from scratch.

 

 

 

Since scripts are purely text, it would ?only? be a matter of translating these branches and nodes into the appropriate format. It don't mean to say it would be easy for whoever trys to build the tool to do, but that it might be possible to do. I mean it would just be scripting wouldn't it. ;)

 

Using this will of course still require knowledge of scripting. If you don't know how to build a script you won't know what to put where and in which order. But it will take a lot of typing out of the equation, which has the benefits of being easier on the scripter, and reducing the chance of human error.

Link to comment
Share on other sites

(snip etc)

Since scripts are purely text, it would ?only? be a matter of translating these branches and nodes into the appropriate format.

 

Using this will of course still require knowledge of scripting. If you don't know how to build a script you won't know what to put where and in which order. But it will take a lot of typing out of the equation, which has the benefits of being easier on the scripter, and reducing the chance of human error.

 

Maybe I'm just old-school, but using something like that sounds like it would take a lot longer and be more complicated than just writing the script code directly. :) Scripts are generally more free-form than other more structured data in the game (2DA's, UTCs etc). This makes it hard to create a point-and-click script builder without limiting functionality. Though I guess you could represent blocks or statements as nodes in a tree instead of indentation as you suggest, you'd still need to somehow represent the code within them.

 

 

 

 

That doesn't mean you have to write scripts in Notepad as it is currently. Decent text editors with programming functionality can provide syntax highlighting, delimiter matching, function tab completion and integrated compilation with NWScript scripts. For example:

ultraeditnssvs1.th.jpg

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...