Jump to content

Has there ever been a TES Script Generator?


PirateDragon

Recommended Posts

I'm currious if the TES community has ever created an external program that generates scripts for use in the game. I'm not familiar enough with TES modding to know if this is needed, but I'm familiar enough with my own ignorance, to know that such a generator has been very useful in the Neverwinter Nights building community.

 

If you do not know what I'm talking about, you can see the Script Wizard by Lilac Soul here. This is a simple GUI tool that generates a block of script for use in Neverwinter Nights 1 & 2.

 

If such a thing exists for Oblivion, or FO3 please let me know. If not, does anyone know if such a tool could be built?

Link to comment
Share on other sites

Since the toolsets for TES4/FO3/NV have included the script editor and compiler, theres never really been a need for a stand alone script tool, as AllenOcelot mentioned. And to be honest, it would only be worth the time it would take a talented coder to make and debug if the toolset was still months and months out.
Link to comment
Share on other sites

debating the need is neither here nor there. That was not the question. NWN 1&2 both have an editor, but it does not write the scripts with the click of a GUI button. Writing scripts can be quite difficult for people that are not coders.

 

There have been lengthy debates on this topic in the NWN communities, and things like "And even for non-programmers, spending a week learning can make you like a pro" have often been said. This does not make it true.

 

Unlikely at best. Sigh.

Edited by PirateDragon
Link to comment
Share on other sites

Not really interested in debating here, but as in all things in life, need plays a huge part of everything. The old saying "necessity is the mother of all invention" is about as accurate as it gets.

The answer to your question is, no, and the largest reason is there has been little or no "need" for a stand alone script editor/compiler for the modern Bethsoft RPGs. There's nothing to debate, that's just the way it has been. :thumbsup:

Edited by Sunnie
Link to comment
Share on other sites

Agreeing with Sunnie here.

This was not up for debate, as stated, even people who cannot hold a pencil propperly get their hand held by the great tutorials bethesda and our own community produce for scripting.

 

You NWN noobs might need help scripting, us nexus guys and girls on the other hand, don't.

Link to comment
Share on other sites

I agree with Sunnie and AllanOcelot

 

The scripting language for TES and FO has always been simplified and straightforward. Far more basic than most OOP languages (except maybe Python? :laugh: ). As far as 3rd party files for scripting goes, the GECK Powerup was useful for checking syntax and OBSE/NVSE/FOSE were injected to add more scripting functions and capabilities, but often weren't necessary.

Link to comment
Share on other sites

Agreeing with Sunnie here.

This was not up for debate, as stated, even people who cannot hold a pencil propperly get their hand held by the great tutorials bethesda and our own community produce for scripting.

 

You NWN noobs might need help scripting, us nexus guys and girls on the other hand, don't.

 

Wow...way to be completely insulting. Great job.

Link to comment
Share on other sites

Having worked with both, part of the reason is that TESScript (the old language) is far too simple of a language to be "usable" by a dynamic script generation program. Even basic things such as loops, math functions (yay taylor expansions for trig functions ... um yea, not really.) , switch/case, etc are completely absent, let alone OOP, polymorphism, recursion, etc (which I believe NWScript can actually do all of these). The new language is likely to look much more like NWScript/UnrealScript/Java than TESScript judging by the features they are introducing (OOP for instance). Long story short, with a more complex scripting language, we might actually see a script generator of some sort come out.

 

Typical NWScript style (from one of my personal archived projects, pardon the messed up indentation):

 

#include "x2_inc_compon"
#include "x0_i0_spawncond"

void TrashObject(object oItem)
{
if ( ! GetIsPC(oItem) ) {
    if(GetHasInventory(oItem) == FALSE){
        DestroyObject(oItem);
    }else{
        object oItem2 = GetFirstItemInInventory(oItem);

        while(GetIsObjectValid(oItem2)){
            TrashObject(oItem2); // Note: Recursion.
            oItem2 = GetNextItemInInventory(oItem);
        }//end while
        DestroyObject(oItem);
    }//end if/else
}
}//end TrashObject(object oItem)

void main()
{
int scoreDe = GetGlobalInt("demon_score");
int scoreDr = GetGlobalInt("drag_score");
int scoreGl = GetGlobalInt("golem_score");
int scoreUd = GetGlobalInt("undead_score");
int scorePl = GetGlobalInt("player_score");
int count = GetGlobalInt("count");

if (count == 3)
{
	SetGlobalInt("count",0);
	if (scoreDe > scoreDr && scoreDe > scoreUd && scoreDe > scorePl && scoreDe > scoreGl)
	{
		SendMessageToPC(GetFirstPC(),"Demons are winning!");
	}
	else if (scoreDr > scoreDe && scoreDr > scoreUd && scoreDr > scorePl && scoreDr > scoreGl)
	{
		SendMessageToPC(GetFirstPC(),"Dragons are winning!");
	}
	else if (scoreUd > scoreDe && scoreUd > scoreDr && scoreUd > scorePl && scoreUd > scoreGl)
	{
		SendMessageToPC(GetFirstPC(),"Undead are winning!");
	}
	else if (scoreGl > scoreDe && scoreGl > scoreDr && scoreGl > scorePl && scoreGl > scoreUd)
	{
		SendMessageToPC(GetFirstPC(),"Golems are winning!");
	}
	else {
		SendMessageToPC(GetFirstPC(),"You are winning!");
	}
	SendMessageToPC(GetFirstPC(),"SCORES:");
	SendMessageToPC(GetFirstPC(),"Demons: " + IntToString(scoreDe));
	SendMessageToPC(GetFirstPC(),"Dragons: " + IntToString(scoreDr));
	SendMessageToPC(GetFirstPC(),"Undead: " + IntToString(scoreUd));
	SendMessageToPC(GetFirstPC(),"Golems: " + IntToString(scoreGl));
	SendMessageToPC(GetFirstPC(),"Player: " + IntToString(scorePl));
	
	if (TRUE){
		object oArea = GetArea(GetFirstPC());
        object oItem = GetFirstObjectInArea(oArea);
		PrintString( "bar_onareaexit: ActionCleanCheck: Cleaning" ); 
        while(GetIsObjectValid(oItem)){
			int iType= GetObjectType(oItem);
			// Debug: Explore info on objects and types.
 			// PrintString( "bar_onareaexit: " + GetName(oItem) + "((" + GetTag(oItem) + ")): " + IntToString(iType) ); 
          	if( (iType == OBJECT_TYPE_PLACEABLE && GetTag(oItem) == "BodyBag") 
				|| (iType == OBJECT_TYPE_CREATURE && GetIsDead(oItem)) ) {
				// Debug: Log trashing
				PrintString( "bar_onareaexit: Trashing Object " + GetName(oItem) + "((" + GetTag(oItem) + ")): " + IntToString(iType) ); 
               	TrashObject(oItem);
            }//end inner if
            oItem = GetNextObjectInArea(oArea);
        }//end while
    }//end if PCinArea check		
}
else {
	count++;
	SetGlobalInt("count",count);
}


}

 

Note this looks a lot more like a real programming language than the mess that is TESScript.

Edited by jimhsu
Link to comment
Share on other sites

While we're on the topic of languages ... or they could go with a complete datatype centric approach such as the Starcraft 2 editor (specifically the infamous DATA EDITOR). Unfortunately, I still can't understand that since it's way too much stuff to keep in my head at one time (I'm talking about all the entity-relationship diagrams, parent-children, instancing, etc etc). Edited by jimhsu
Link to comment
Share on other sites

  • Recently Browsing   0 members

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