RE: dbg's shield pack

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
pip
Militia Lieutenant
Militia Lieutenant
Posts: 114
Joined: Fri Jul 13, 2012 6:31 am

http://xelerus.de/index.php?s=mod&id=1229

This is awesome. There is but one tiny flaw which sits in my ointment of enjoyment like the ugly fly it is....
The Brushburn Deflector.

There's nothing actually wrong with the concept; a shield that grows.
However it does something irritating.
What I gather it's supposed to do is add 40hp to the shield max. every time it collapses upto 10 times which it does fine, the problem being that if a lv.10 shield collapses it wraps round it's limit and reverts to lv.1 losing all the extra hp.

The bit in question:

Code: Select all

<OnShieldDown>
				(block (charges chargesDelta newStrength maxCharges)
					(setq charges (itmGetCharges gItem))
					(setq maxCharges 10)
					
					(if (ls charges maxCharges)
						(setq chargesDelta 1)
						(setq chargesDelta (subtract 0 maxCharges))
						)

					(shpRechargeItem gSource gItem chargesDelta)
					(objSendMessage gSource Nil (cat "Analyzing failure. . .Advancing to strength level " (add (add charges chargesDelta) 1)))
					)
</OnShieldDown>
FourFire
Militia Captain
Militia Captain
Posts: 567
Joined: Sun Aug 12, 2012 5:56 pm

Ho, that is pretty bad, perhaps a way to solve it (In pseudocode because I'm unknowledgeable) could be

(if charges <10
[insert rest of code here])
else null;

either that or just increase the max charges to some absurd number and reduce the HP increase per charge.
(func(Admin Response)= true){
if(admin func(amiable) = true)
Create func(Helpful Posts)
else func(Keep Calm and Post derisive topics)}
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Code: Select all

<OnShieldDown>
	(block (charges chargesDelta newStrength maxCharges)
		(setq charges (itmGetCharges gItem))
		(setq maxCharges 10)
		
		(if (ls charges maxCharges)
			(setq chargesDelta 1)
			(setq chargesDelta 0) <!-- Stop changing charges when maxCharge reached -->
			)

		(shpRechargeItem gSource gItem chargesDelta)
		(objSendMessage gSource Nil (cat "Analyzing failure. . .Advancing to strength level " (add (add charges chargesDelta) 1)))
		)
</OnShieldDown>
This version just fixes the loopback.

Code: Select all

<OnShieldDown>
	(block (charges chargesDelta newStrength maxCharges)
		(setq charges (itmGetCharges gItem))
		(setq maxCharges 10)
		
		(if (ls charges maxCharges)
			(block Nil
				(setq chargesDelta 1)
				(shpRechargeItem gSource gItem chargesDelta)
				(objSendMessage gSource Nil (cat "Analyzing failure. . .Advancing to strength level " (add (add charges chargesDelta) 1)))
			)
			(objSendMessage gSource Nil (cat "Analyzing failure. . . Shield already at maximum level " charges)) <!-- Stop changing charges when maxCharge reached -->
		)
	)
</OnShieldDown>
This version is also slightly more user friendly.

Be sure to contact DBG on the forums or Xelerus.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
Post Reply