[ARCHIVED] Archived UOX3 Version (0.98-3.6 - Updated April 5th, 2006)

Where we archive the version changelog threads
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

giwo wrote:

Code: Select all

[color=yellow]3/20/2006 - giwo (0.98-3.5n [3.6 RC])[/color]
	Fixed an issue causing the Backpack entry on a popup menu to display as selectable when the character
		should not have a pack (IE a non-pack animal).
While you are at fixing this, you can open the paperdoll of chars that shouldn't have one using the popup menu. It doesn't matter that the menu entry is gray:

Image
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Code: Select all

[color=yellow]3/20/2006 - giwo[/color]
	Fixed a glitch in the CPExtendedStats packet.
	Modified CPIPopupMenuSelect to prevent opening the paperdoll of a non-human.
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Hey, does that mean it's possible to setup UOX3 to allow characters of non-human id's to use the standard paperdoll? For instance in a race system where the players are polymorphed as orcs or ratmen or what have you?
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I was actually suprised to see Grimson actually get a valid paperdoll from an animal. Once apon a time trying to open the paperdoll of a creature would cause a client crash. I wonder if the client can handle it now on all creatures, or just some.
Scott
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

giwo wrote:I was actually suprised to see Grimson actually get a valid paperdoll from an animal.
You might even be more surprised that I can also open the not-existing backpack of a dolphin, via the popup :P.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Code: Select all

[dolphin]
{
NAME=a dolphin
ID=0x0097
DIRECTION=E
BACKPACK
...
;)
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Xuri wrote:

Code: Select all

[dolphin]
{
NAME=a dolphin
ID=0x0097
DIRECTION=E
BACKPACK
...
;)
Oh, then the Backack entry shouldn't be grey for it :P.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

giwo wrote:I was actually suprised to see Grimson actually get a valid paperdoll from an animal. Once apon a time trying to open the paperdoll of a creature would cause a client crash. I wonder if the client can handle it now on all creatures, or just some.
Well, if possible, then a js method/function/whatnot to open a paperdoll would be nice to have =) Coupled with the event which runs when doubleclicking any character, that would allow people to use paperdolls for their polymorphed player races :P
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

You can open a dolphins pack because you are GM, and it has a pack.
Scott
Kiff
UOX3 Apprentice
Posts: 100
Joined: Fri Mar 03, 2006 2:30 am
Has thanked: 0
Been thanked: 0

Post by Kiff »

Going back one page, will there be a way to keep the armour method instead of the resistance method? Or is everything going towards resistance?
Never Underestimate the Power of Stupid People in Large Groups
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Armor == Physical Resistance


So the two are synonymous, if you want Pre-AOS settings, just don't make use of elemental damage / resist.
Scott
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=yellow]3/21/2006 - grimson[/color]
	A small fix to ApplyDamageBonuses(), the race damage of a weapon was applied to the final
	damage instead of the weapons base damage.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=yellow]3/21/2006 - grimson[/color]
	Call the OnHungerChange JS event in the SetHunger() function of chars instead of calling
	it in every part of the code the where the hunger gets changed.

	Added a new JS event:
	onCombatDamageCalc( attacker, defender, getFightSkill )
		This event is called everytime combat damage is calculated. You can do your own damage
		calculation and return the damage to override the engine damage calculation, or return
		a negative damage value to use the engine damage calculation.
The onCombatDamageCalc event is executed on the script id assigned to the attacker char or as a global script if the char has no script assigned. So you have to add it into your global script and into every script assigned to chars to override the damage calculation everywhere.

An example of using that event that does the same as the engine does:

Code: Select all

function CalculateHitLoc( )
{
	var BODYPERCENT = 0;
	var ARMSPERCENT = 1;
	var HEADPERCENT = 2;
	var LEGSPERCENT = 3;
	var NECKPERCENT = 4;
	var OTHERPERCENT = 5;
	var TOTALTARGETSPOTS = 6;
	
	var LOCPERCENTAGES = new Array( 44, 14, 14, 14, 7, 7 );

	var hitLoc = RandomNumber( 0, 99 ); // Determine area of Body Hit
	for( var t = BODYPERCENT; t < TOTALTARGETSPOTS; ++t )
	{
		hitLoc -= LOCPERCENTAGES[t];
		if( hitLoc < 0 ) 
		{
			hitLoc = t + 1;
			break;
		}
	}
	return hitLoc;
}

function onCombatDamageCalc( pAttacker, pDefender, fightSkill )
{
	var baseDamage = pAttacker.attack;
	var hitLoc = CalculateHitLoc();

	if( baseDamage == -1 )  // No damage if weapon breaks
		return 0;

	var damage = ApplyDamageBonuses( 1, pAttacker, pDefender, fightSkill, hitLoc, baseDamage );

	if( damage < 1 )
		return 0;

	damage = ApplyDefenseModifiers( 1, pAttacker, pDefender, fightSkill, hitLoc, damage, true);

	if( damage <= 0 ) 
		damage = RandomNumber( 0, 4 );

	if( !pDefender.npc ) 
		damage /= 2;

	return damage;
}
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=yellow]3/21/2006 - grimson[/color]
	Changed the return value of OnCombatDamageCalc() to a SI16, I accidentially declared it to
	be a SI32.
	Replaced the JS Char property .defense with the new JS Char Method:
		mChar.Defense( hitLoc, damageType, doArmorDamage );
	so you can get all the different defense values for a char.
Kiff
UOX3 Apprentice
Posts: 100
Joined: Fri Mar 03, 2006 2:30 am
Has thanked: 0
Been thanked: 0

Post by Kiff »

Sorry for seeming ignorant, but is there a simple way to not make use of elemental/ resist? A 1/0 that is changed in a script?
Never Underestimate the Power of Stupid People in Large Groups
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I can say with 99% assurity that we DON'T make use of elemtal resistances currently. Grimson is just making it possible to do so.

I'm rather sure that to enable elemental resistances you have to modify the armor and weapon dfn's to add elemental resists/damage.
Scott
Kiff
UOX3 Apprentice
Posts: 100
Joined: Fri Mar 03, 2006 2:30 am
Has thanked: 0
Been thanked: 0

Post by Kiff »

All right wonderful, I'll just avoid doing all that work then :p
Never Underestimate the Power of Stupid People in Large Groups
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=yellow]3/22/2006 - grimson[/color]
	Removed the code to raise your resistance value upon elemental damage, this can be done better in JS.
	Modified  CBaseObject::DumpBody() and CBaseObject::HandleLine() so that all resistance values get saved
	and loaded in/from the worldfiles.
	Added a new JS event:
		onDamage( damaged, attacker, damageValue )
		This will be fired everytime the char "damaged" gets damaged, the attacker can be a char or NULL.

Code: Select all

[color=yellow]3/22/2006 - grimson[/color]
	Small fix to ApplyDamageBonuses() caused by my previous commit.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Code: Select all

[color=yellow]3/23/2006 - grimson[/color]
	Fixed a bug with the JS override for the combat damage calculation that caused 0
	damage to be applied when the attacker has no script attached and the global script
	doesn't exist eigther.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Code: Select all

[color=yellow]3/23/2006 - giwo (0.98-3.5o [3.6 RC])[/color]
	Minor changes to cSkills::Fish().
	Fixed an issue making it impossible to open Elven NPC paperdolls.
	Removed some typedefs that were no longer used.
	Moved CChar values townpriv and townvote to PlayerValues_st
	Moved CChar values foodList, hungerWildChance and hungerRate to NPCValues_st
	Removed CChar::inBuilding in favor of using a bools flag.
	Removed handling code for several unused Character values.
Scott
Locked