"Transform Permanently" eleminated bad spots

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Barbie
Godlike
Posts: 1703
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: "Transform Permanently" eleminated bad spots

Post by Barbie » Sat Aug 24, 2019 1:01 pm

sektor2111 wrote:"Weo Priest" is immune at everything
That's not true. The value of "ReducedDamageType" is "All" but the value of "ReducedDamagePct" is zero. With Pawns this means "ReducedDamageType=All" has no effect. See last line of following stock code:
code of Pawn.uc
Show

Code: Select all

function TakeDamage( int Damage, Pawn instigatedBy, Vector hitlocation,
						Vector momentum, name damageType)
...
	actualDamage = Level.Game.ReduceDamage(Damage, DamageType, self, instigatedBy);
	if ( bIsPlayer )
	{
		if (ReducedDamageType == 'All') //God mode
			actualDamage = 0;
		else if (Inventory != None) //then check if carrying armor
			actualDamage = Inventory.ReduceDamage(actualDamage, DamageType, HitLocation);
		else
			actualDamage = Damage;
	}
	else if ( (InstigatedBy != None) &&
				(InstigatedBy.IsA(Class.Name) || self.IsA(InstigatedBy.Class.Name)) )
		ActualDamage = ActualDamage * FMin(1 - ReducedDamagePct, 0.35);
	else if ( (ReducedDamageType == 'All') ||
		((ReducedDamageType != '') && (ReducedDamageType == damageType)) )
		actualDamage = float(actualDamage) * (1 - ReducedDamagePct);
Last edited by Barbie on Sat Aug 24, 2019 5:34 pm, edited 1 time in total.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

User avatar
Gustavo6046
Inhuman
Posts: 804
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Finite
Contact:

Re: "Transform Permanently" eleminated bad spots

Post by Gustavo6046 » Sat Aug 24, 2019 3:34 pm

To avoid mismatches and the like, we need a proper patching system, where a program can generate patches from an original .U to a modified .U, and applying those patches shall create a new, renamed file.

So, if we have v1 and v2 of a MyMod.u, we can generate a patch from a previous version, but this patcher tool would generate a renamed copy of MyMod.u (which should be the v1 filename) when it applies the v2 patch.

User avatar
sektor2111
Godlike
Posts: 4079
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: "Transform Permanently" eliminated bad spots

Post by sektor2111 » Sat Aug 24, 2019 7:29 pm

Barbie wrote:That's not true. The value of "ReducedDamageType" is "All" but the value of "ReducedDamagePct" is zero.
Yes because he was clueless and his idea was another one wrong applied in practice.
Gustavo6046 wrote:To avoid mismatches and the like...
..
when it applies the v2 patch.
The fact is as I have explained already, a MH game/server runs properly with CONFORMED files (using sanity checks and small adds) and such a conformed file will never do any mismatch as much as there is not a single problem with FINAL functions (we might have X GENERATIONS of finals) in such case. I won't deny that conforming has compatibility limitations in several cases but mainly wrapping things is doable.

And time for evidences ( for not talking like not having a clue 90% about what I'm saying ) we do have a player using UT v436 properly playing a Network game joined in a UT v451b server. Engine files are different from 436 to 451b and such session playable, but... we have this said "compatibility" - it's 50% in reality, because can be problem in reversal, with 451b player joined to a 436 server (if it's able to join...) because 451b player is expecting those add-ons which a 436 server won't have - modifications a la UTPG.

Okay, THIS map now - and not only this map. Due to a constant dumbness toward movers I might be willing to drop an auto-fix right in Engine file for preventing to load another ServerActor (with another iterations charge) or replacing a base function using XC_Engine. Way to many maps are messed up here... and if a problem will occur a private patch for map will solve the bad occurrence... probably code will deal with "class.default..." and so on... and using logs of course for showing exactly who does what.
As for some ScriptedPawn love, I think I will need to open another to do list regarding to mapper "preferences" and resetting all dumb editing like:
- screwed cylinders;
- invalid orders generating null states;
- various reduceddamage types;
- combat variables out of normality;
- unexistent real skill - I know what I'm saying here;
- etc.
Including a fix for default pupae - running without to eat dusty ground - pre-pivoting it higher automatically. Etc, etc.
The only major problem is fixing some pathing task directly in stock as long as we do have holes:
- default Scout is not for run-time - another Scout breaks compatibility in a way - or default Scout needs... some 3 lines of code added;
- if we have solved Scout problem I cannot be sure about creating reachSpecs because those natives probably won't work out of Editor as long as nothing is declaring them for a run-time specific task - shame, EPIC...
- etc ?

Post Reply