Creating NPC problem

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Invictus

Creating NPC problem

Post by Invictus »

There is some kind of problem with NPC creating..
I want to create a new monster an example an abyssmal horror, but it has 411 str and 6000 hits... and how it could be done in POL 95?
Because the number of hits can`t be over str by default.

STR 411
INT 411
DEX 86
HITS 6000
MANA 411
STAM 86

Please help)
Firedancer
Grandmaster Poster
Posts: 104
Joined: Fri Feb 03, 2006 6:32 am

Re: Creating NPC problem

Post by Firedancer »

Invictus wrote:There is some kind of problem with NPC creating..
I want to create a new monster an example an abyssmal horror, but it has 411 str and 6000 hits... and how it could be done in POL 95?
Because the number of hits can`t be over str by default.

STR 411
INT 411
DEX 86
HITS 6000
MANA 411
STAM 86

Please help)
What exactly is the problem? NPC's are indeed treated differently than players, so their stats donot have to be related to their vitals. In my eyes, what you describe here should be legal values that should work... depending what exactly you want to achieve that is...

Or are you trying to make sure npc's are treated equally to players?
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Actually, something doesn't make sense here to me.
I am unable to set an NPC HITS greater than STR either.

If I try:

Code: Select all

	STR		80
	INT		25
	DEX		60

	HITS		200
	MANA		25
	STAM		60
Then the monster gets 80 hp, not 200.

If I manually set the HP to 200, it drops to 80 again.
095 and 096 test shard - same result.

At the risk of appearing more foolish than normal, I was also under the impression that hp was tied to str - npcs and players. I am not doubting you Firedancer, but I sure would like to know what's going on here so I can create monsters that are harder to kill without tuning AR. I don't care if I am wrong here, just want to know why!

I went through my scripts for creating an npc and I don't see an override for hp.
User avatar
MontuZ
Forum Regular
Posts: 338
Joined: Fri Feb 10, 2006 8:08 am

Post by MontuZ »

vitals.cfg wrote:Vital Life
{
RegenWhileDead 0
Alias Hits
Alias HP
RegenRateFunction regen:GetLifeRegenRateExported
MaximumFunction regen:GetLifeMaximumValueExported
}

Vital Mana
{
RegenWhileDead 0
Alias MP
RegenRateFunction regen:GetManaRegenRateExported
MaximumFunction regen:GetManaMaximumValueExported
}

Vital Stamina
{
RegenWhileDead 0
Alias Stam
Alias SP
RegenRateFunction regen:GetStaminaRegenRateExported
MaximumFunction regen:GetStaminaMaximumValueExported
}

Code: Select all

exported Function GetLifeMaximumValueExported( mob )

    Var maxlife := ( GetAttribute( mob, ATTRIBUTEID_STRENGTH ) * 100 );

    Var NPC_Cfg := ReadConfigFile( ":*:npcdesc" );

    If( mob.IsA( POLCLASS_NPC ) )
    
    Var lifestat := NPC_Cfg[mob.npctemplate].HITS; // Look for HITS in npcdesc.cfg and use that as life, this is just a rough example.

    Return CInt( lifestat );
    Endif

    Return CInt( maxlife );
 
Endfunction
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

That must be in the distro - I don't use the regen code.
I went straight to the regen code initially myself :)

Now that I know it's possible to have a higher HP than Strength I will leave no stone unturned to get this done :)

Interesting - it means the core does not handle them separately.


Update: ok, it works just fine. My World of Dreams base scripts just didn't have that code in there and until today I had no idea you could separate them. (Works fine for dex/stam and int/mana too)
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm

Post by qrak »

OldnGrey could you tell me where can i download worldofdreams scripts? Official site doesn't work.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Sorry, I don't know. It's probably on his new shard's site (using RunUO). I am out of touch with what Drocket has been doing since he dropped Pol.
User avatar
MontuZ
Forum Regular
Posts: 338
Joined: Fri Feb 10, 2006 8:08 am

Post by MontuZ »

OldnGrey wrote:Works fine for dex/stam and int/mana too
Yeah, I just posted that part as an example. :)
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

grak,

I have uploaded World of Dreams shard to my website for you.

http://www.hopelives.us/Files/WoD95.zip
Post Reply