Basically an "is this possible, or am I just making noise" thread.
A while ago someone requested help in making any weapon omni capable, and someone else produced a snip of code to do just that (I've been looking for this thing for four days now and can only conclude I am useless at searching).
Anyway, I had a thought.
Would it be possible to create an installable device to covert a weapon to omni fire?
Also, would it be possible to create a similar device to mount a weapon in the launcher slot?
Weapon Attribute Device
Yes. Weapons' firing arcs can be changed from default to 'omnidirectional (and their positions changed if necessary).
Existing devices cannot be converted into a launcher. You need to create a separate entity that has the same stats except launcher="true".
EDIT - For setting weapon to be omnidirectional, use this...
where item is the weapon to be upgraded.
Existing devices cannot be converted into a launcher. You need to create a separate entity that has the same stats except launcher="true".
EDIT - For setting weapon to be omnidirectional, use this...
Code: Select all
(objSetItemProperty gSource item 'fireArc 'omnidirectional)
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!
Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!
Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
That launcher restriction would explain some of the convolutions in these weapon mods, I knew it had to be specified but had no idea if it could be changed or not.
Thanks PM.
----
That doesn't work, so obviously I've got it wrong.
Wouldn't it need telling to associate itself with an installed weapon, or does gSource do that?
Thanks PM.
----
Code: Select all
<Events>
<OnInstall>
(objSetItemProperty gSource item 'fireArc 'omnidirectional)
</OnInstall>
</Events>
Wouldn't it need telling to associate itself with an installed weapon, or does gSource do that?
That seems like perfectly solid advice. Sadly I'm not exactly sure how to do that.
Had a brief look through the wiki (which is not exactly the "friendliest" of resources) and came up with itmEnumTypes, but nothing about it other than how to print lists of everything in the game.
For starters, is that the exp I should be using for this?
And is there anywhere with stuff to read about how to chain all these things together?
(Just as an aside, I haven't touched any kind of code since Total Annihilation was a thing. At least this gem doesn't use cob/bos. That would be awful.
So yeah.... Ever so slightly out of practice.)
Had a brief look through the wiki (which is not exactly the "friendliest" of resources) and came up with itmEnumTypes, but nothing about it other than how to print lists of everything in the game.
For starters, is that the exp I should be using for this?
And is there anywhere with stuff to read about how to chain all these things together?
(Just as an aside, I haven't touched any kind of code since Total Annihilation was a thing. At least this gem doesn't use cob/bos. That would be awful.
So yeah.... Ever so slightly out of practice.)
Okay, this is like trying to run through an ocean of treacle.
So far I've got:
and then what?
So far I've got:
Code: Select all
(enum (objGetItems gSource <some means of identifying installed weapons of which I have no clue>)
The rest:
Reference event implementation of omnidirectionalizer device:
Code: Select all
(enum (objGetItems gSource "wI") theItem
(objSetItemProperty gSource theItem 'fireArc 'omnidirectional)
)
Code: Select all
<Events>
<OnInstall> <!-- For each item on the ship gSource matching criteria "wI" (weapons Installed) set that item's 'fireArc to 'omnidirectional -->
(objEnumItems gSource "wI" theItem
(objSetItemProperty gSource theItem 'fireArc 'omnidirectional)
)
</OnInstall>
<OnUninstall> <!-- Opposite of the above, disable omnidirectional enhancement when turret device is uninstalled -->
(objEnumItems gSource "wI" theItem
(objSetItemProperty gSource theItem 'fireArc Nil)
)
</OnUninstall>
<OnEnable> <!-- Copy and paste code in OnInstall here -->
</OnEnable>
<OnDisable> <!-- Copy and paste code in OnUninstall here -->
</OnDisable>
</Events>
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ