Page 1 of 1
Neutral Flag bug?
Posted: Sat Feb 11, 2006 8:19 am
by stranf
So I loaded Grimson's 3.2-o build and was excited to play.
As I was traveling to Britian I watched a few worldsaves and garbage cleanups take place....I was suprised to see nearly 311 items being removed....I thought, "wow? What is it erasing?"
Then when I hit Britian I realized what it was.........
My FIGHTERS WENT RAMPANT!! Murder in the street! Nearly all my NPCs in all my towns are gone.... (A few guards were able to take down the fighters that got too close...)
So is the reason fighters are hostile due to this neutral bug? I asked Grimson to post 3.2p......this clears this problem right? Looks like I'll have to repopulate some cities again. hehehe.
Re: Neutral Flag bug?
Posted: Sat Feb 11, 2006 8:23 am
by giwo
stranf wrote:
So is the reason fighters are hostile due to this neutral bug? I asked Grimson to post 3.2p......this clears this problem right? Looks like I'll have to repopulate some cities again. hehehe.
Yeah... the danger of experimental builds, while I try to test every change, time doesn't always allow....
Anyhow, Grimson has already fixed this bug, so as soon as another experimental exe gets posted you'll be all set.
Posted: Sat Feb 11, 2006 8:47 am
by stranf
Nice! Generally I back up the worldfile before trying and experiemental exe, but I missed is this time (and a worldsave happened, so I lost some NPCs.)
But you know, it was a lot of fun at the same time. Good 'ol stranf enters town at night....
*another thing....thanks for increasing the light levels, night was VERY dark, couldn't see a thing outside the torch radius*
Stranf enters town, and stumbles upon a corpse. and outside....in the darkness, on all four angles..: *Bob attacks Stranf*....*Bill attacks stranf*....etc. etc.
So Stranf bravely takes down 4 or 5 fighters, and actually saved a noble female from sudden death as he engaged a fighter chasing the poor fleeing maid.
It created some fun roleplaying, and was very surprising.
So here is an idea that came from this bug:
Could we create a massAIChange(tag NPC, int NPCAI) function that can be bound to a specific NPC id? Example: we create a "Rebel" (who appears to the PC as a standard fighter) in a .dfn file. We place these undercover people in various towns across britannia.
Players aren't worried, go about their lives, and eventually, the GM types in: 'massAIChange(Rebel, hostile_int).
Uox3 changes ALL NPCs created from Rebel to hostile....and BAM, you have a syncronized rebellion throughout the land...
could be kind of fun...
Posted: Sat Feb 11, 2006 8:59 am
by giwo
That's quite possible, and I believe were one so inclined they could create a JavaScript that would do just the thing.
Something like this:
Code: Select all
function CommandRegistration()
{
RegisterCommand( "massAIChange", 2, true );
}
function command_MASSAICHANGE( socket, cmdString )
{
percentToChange = 100;
if( cmdString )
percentToChange = StringToNum( cmdString );
BroadcastMessage( "Townsfolk everywhere are going crazy!" );
var count = IterateOver( "CHARACTER" );
}
function onIterate( toCheck )
{
if( toCheck && toCheck.isChar )
{
if( toCheck.npc && toCheck.aitype == 0 ) // They are an NPC and don't have any AI
{
if( RandomNumber( 0, 99 ) + 1 <= percentToChange )
{
toCheck.aitype = 2; //Evil
toCheck.npcFlag = 2; //Flag Red
return true;
}
}
}
return false;
}
Posted: Sat Feb 11, 2006 1:20 pm
by Xuri
Wouldn't have to be random either. You could set up all the "Rebels" with a certain tag - like, oh I don't know... "rebel=1"

- and then check for that in the onIterate function when determining which NPCs should start rebelling.
Of course that would be easier if we had a way of assigning custom tags through the DFNs. *cough*

Posted: Sat Feb 11, 2006 2:49 pm
by Grimson
stranf wrote:Nice! Generally I back up the worldfile before trying and experiemental exe, but I missed is this time (and a worldsave happened, so I lost some NPCs.)
That's one of the reasons why I choosed the spawn.dfn to place NPCs. Another reason is that I can start over with a clean world without having to redo all spawns.
Posted: Sat Feb 11, 2006 5:30 pm
by stranf
This is a little off-topic of the post,
but Grimson, is there an easy way to add NPCs through the spawn.dfn? I tried once, and found it to be easier to just place them through the GM menu...
Posted: Sat Feb 11, 2006 5:34 pm
by Grimson
stranf wrote:but Grimson, is there an easy way to add NPCs through the spawn.dfn? I tried once, and found it to be easier to just place them through the GM menu...
Not in-game, but using the tool from this post:
viewtopic.php?p=2697#2697 it isn't very hard.