Creating new weapons

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
Datal
Militia Commander
Militia Commander
Posts: 309
Joined: Mon Feb 07, 2011 12:54 pm
Location: Hyno Gunship

Hello!
I would like to ask you about a few features about weapons code. First of all, what is the difference between
Damage= "2d8"' damage="8" and 8d3. And second, what exactly means lines:

Code: Select all

OnUpdate=
CounterUpdate=
CounterUpdateRate= 
I really have to know that, and by the way this would be helpful for other modders :)

Thanks
Datal
Militia Commander
Militia Commander
Posts: 309
Joined: Mon Feb 07, 2011 12:54 pm
Location: Hyno Gunship

(By chance I made two topics, I'm sorry, I would ask for the removal of the second)
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Duplicate removed. And some answers.

The game uses dice notation for damage. 1d6 is the familiar cube from Monopoly and Yahtzee and Craps. Transcendence isn't limited to platonic dice and any positive number of dice and sides is possible. The more dice the narrower the probability curve. A constant is also allowed or a dice roll and a constant (eg. 1d6+1 or 1d6-1).

I'm not familiar with any onUpdate XML attribute, but the way you've grouped it with counterUpdate and counterUpdateRate it may be a new name for counterActivate. There is also an onUpdate event that IIRC is triggered approximately every real world second. It's not guaranteed to fire at an exact interval, making it less suitable for precise timing, but it is good for noncritical processing in that it doesn't produce as much lag as more strictly defined repeating timers. It's also possible that this is a new notation for that I suppose. I haven't scripted in the new alphas.

A weapon counter goes from 0 to 100. A capacitor weapon will not fire if firing would reduce the counter below 0. A temperature weapon will be disabled and possibly damaged if the counter exceeds 100.

counterActivate is the change to the counter when the weapon is fired. It should be positive for temperature weapons and negative for capacitor weapons.

counterUpdate is the change to the counter every counterUpdateRate ticks. A tick is two game seconds. (A firerate 15 or 16 weapon will fire every 8 ticks.) CounterUpdate should be negative for temperature weapons and positive for capacitor weapons. CounterUpdateRate should always be positive.
Literally is the new Figuratively
Datal
Militia Commander
Militia Commander
Posts: 309
Joined: Mon Feb 07, 2011 12:54 pm
Location: Hyno Gunship

Thanks :) I have another question. Here is the desirable code:

Code: Select all

damage= "thermo:8d12+8; momentum3; WMD5"

Code: Select all

recoil="2"
I would like to know what this phrases means: momentum, recoil and WMD. As I know WMD is something related with station damages.
Yeah Atarlost, it should be:

Code: Select all

 counter=   "capacitor"
				counterActivate=	"-5"
				counterUpdate=		"2"
				counterUpdateRate=	"6"
Post Reply