Missile and Laser Enumerations
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 75
- Joined: Wed, 9. Nov 05, 02:05
Missile and Laser Enumerations
In an earlier post http://forum2.egosoft.com/viewtopic.php?t=101831 nuclear_eclipse provided a list of the bits that allow for choosing what weapons could be applied to mounts. I was wondering where he got these values as I have been looking through the files looking for this list. Reason being I would like my editor to be able to add new weapons if possible and I also would like to avoid hard-coding values into the Mod Designer. For now, I will hard-code the values but if there is a file I can read to get these values, this would be a much better approach.
BTW, The ship editing portion of the Mod Designer is almost complete. I'd like a couple beta testers to verify that the fields are all mapped correctly, sure would help in testing that part of the module.
BTW, The ship editing portion of the Mod Designer is almost complete. I'd like a couple beta testers to verify that the fields are all mapped correctly, sure would help in testing that part of the module.
AMD Phenom 9600+
Nvidia 8800 GTS 320
4 GIGs Dual Channel Memory
2 250 gig Raid 0 3 Gb/s drives
LogiTech Extreme 3D Pro USB - If I can find it ...
Nvidia 8800 GTS 320
4 GIGs Dual Channel Memory
2 250 gig Raid 0 3 Gb/s drives
LogiTech Extreme 3D Pro USB - If I can find it ...
-
- Posts: 4447
- Joined: Tue, 2. Dec 03, 22:28
-
- Posts: 78
- Joined: Mon, 13. Jun 05, 15:44
I've been working on new weapons.
I've been successful in adding one new weapon-slot "29" , but no more
than that. You can add slots higher than "29" but they don't work right
in-game, I've never been able to get them to anyway.......
Currently I'm trying the route of overwriting some of the slots that
are not used in a non-plot game i.e. the plot super PBE and the
Terran weapons, this works fine aside from the fact that the
weapons replacing the terran weapons show up as "unknown object"
in a regular game outside of the galaxy editor even though my
text file has new names and descriptions that work fine in the
galaxy editor.
I have two weapons working the way I want them to
for the most part, the third was meant to be a capital ship
super-weapon, it works, but I can't for the life of me, manage to
get the main gun slot at the front of the capital ships to work.
The weapon shows up in the quick menu, but you can't fire it.
It works fine in the turrets, but this isn't what I was going for.
I was thinking about cleaning up what I have so far and posting
them so people working on weapons can look at what I did for
reference. There may be people that have gotten much further
with this than I have, but if there are they are keeping it under their
hat as I haven't seen any.
So, would anybody like me to put this stuff up?
Maybe you can spot something I overlooked.
I've been successful in adding one new weapon-slot "29" , but no more
than that. You can add slots higher than "29" but they don't work right
in-game, I've never been able to get them to anyway.......
Currently I'm trying the route of overwriting some of the slots that
are not used in a non-plot game i.e. the plot super PBE and the
Terran weapons, this works fine aside from the fact that the
weapons replacing the terran weapons show up as "unknown object"
in a regular game outside of the galaxy editor even though my
text file has new names and descriptions that work fine in the
galaxy editor.
I have two weapons working the way I want them to
for the most part, the third was meant to be a capital ship
super-weapon, it works, but I can't for the life of me, manage to
get the main gun slot at the front of the capital ships to work.
The weapon shows up in the quick menu, but you can't fire it.
It works fine in the turrets, but this isn't what I was going for.
I was thinking about cleaning up what I have so far and posting
them so people working on weapons can look at what I did for
reference. There may be people that have gotten much further
with this than I have, but if there are they are keeping it under their
hat as I haven't seen any.
So, would anybody like me to put this stuff up?
Maybe you can spot something I overlooked.
Core i7 - 860
4096MB DDR3 dual channel
BFG Geforce GTX 280
SB X-FI Gamer
500 GB Seagate Barracuda SATA HD
Sony DRU-840A
Win 7 Ult 64
4096MB DDR3 dual channel
BFG Geforce GTX 280
SB X-FI Gamer
500 GB Seagate Barracuda SATA HD
Sony DRU-840A
Win 7 Ult 64
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
Yes the mask is simply an index to the respective T file (TMissiles, TLasers).Sandalpocalypse wrote:I believe it is by position in the TLaser file.
So if you want to equip 1st and 2nd laser from TLasers, you must set the "Possible Lasers" (or Laser mask) to
Code: Select all
0011b
(1st bit set and 2nd bit set) which is
Code: Select all
3d
Because the mask is stored as integer, which is 32b long, you can never have more then 32 missiles/lasers. (Running 64b CPU will really not help you

As X3 already has 29 missiles and lasers, you will have to overwrite some existing in order to add your own. Looks like we have exchanged the ablity to have "infinite" number of ships for the ability to have more missiles/lasers.
-
- Posts: 78
- Joined: Mon, 13. Jun 05, 15:44
@doubleshadow
I installed the newest version of your editor, and now I have been able to
add more than 1 weapon slot. I currently have a working mod with three
new weapons, without overwriting any of the originals.
I have now narrowed my bugs down to:
-Can only equip new weapons via quickmenu
-new weapons show "=textidnotfound=" when you
mouseover in the quickmenu, even though I have the
descriptions working properly everywhere else.
-Still haven't figured out how or if it's even possible to get the
main-gun slot on capital ships to work.
I installed the newest version of your editor, and now I have been able to
add more than 1 weapon slot. I currently have a working mod with three
new weapons, without overwriting any of the originals.
I have now narrowed my bugs down to:
-Can only equip new weapons via quickmenu
-new weapons show "=textidnotfound=" when you
mouseover in the quickmenu, even though I have the
descriptions working properly everywhere else.
-Still haven't figured out how or if it's even possible to get the
main-gun slot on capital ships to work.
Core i7 - 860
4096MB DDR3 dual channel
BFG Geforce GTX 280
SB X-FI Gamer
500 GB Seagate Barracuda SATA HD
Sony DRU-840A
Win 7 Ult 64
4096MB DDR3 dual channel
BFG Geforce GTX 280
SB X-FI Gamer
500 GB Seagate Barracuda SATA HD
Sony DRU-840A
Win 7 Ult 64
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
Really? Holy sh**... My tools are getting smarter then their creator... So you are running with 32 lasers? Interesting. However you cannot go further becauselefthandblack wrote:I installed the newest version of your editor, and now I have been able to
add more than 1 weapon slot. I currently have a working mod with three
new weapons, without overwriting any of the originals.
a) - X3E does not allow to add more then 32 lasers/missiles
b) - 1 int == 32 bits no matter how hard you try

Thanks for leting me know.
-
- Posts: 1129
- Joined: Thu, 2. Sep 04, 01:54
-
- Posts: 75
- Joined: Wed, 9. Nov 05, 02:05
So the first weapon in the list is the first bit and the second one listed in the list is the second bit and so forth until I reach the max limit of 32. Okay, that should work pretty well then.
I'm hoping I will be able to release some screen shots after Christmas. (Oh great, I just gave myself a deadline) lol.
I'm hoping I will be able to release some screen shots after Christmas. (Oh great, I just gave myself a deadline) lol.
AMD Phenom 9600+
Nvidia 8800 GTS 320
4 GIGs Dual Channel Memory
2 250 gig Raid 0 3 Gb/s drives
LogiTech Extreme 3D Pro USB - If I can find it ...
Nvidia 8800 GTS 320
4 GIGs Dual Channel Memory
2 250 gig Raid 0 3 Gb/s drives
LogiTech Extreme 3D Pro USB - If I can find it ...
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
Basically - yes. But I've found that sometimes the behaviour is "strange". I'm still wondering if the masks are 32bit or 64bit. For example if you put -1 as the mask number, then you have access to all the lasers - even beyond the 32! But when I simply wanted to enable just laser with index 33 (the 34th laser) the ship was "weaponless" i.e. no ability to add anything. Also when the mask number is "high enough" (whatever this may be) you are able to equip the laser idx 32 (the 33th laser) although you shoudn't be as the respective bit is not set.
I think that the mask probably is 32bit bit, but there are some hacks how to overcome this. Maybe typing IDDQD would help
There were times where this worked like a charm 
I think that the mask probably is 32bit bit, but there are some hacks how to overcome this. Maybe typing IDDQD would help


-
- Posts: 213
- Joined: Sat, 8. May 04, 22:29

Last edited by Bubba Fat on Fri, 16. Dec 05, 13:23, edited 1 time in total.
Bubba Fat is where it's at!
http://yoyodyne.bravehost.com/
Shortcut to Mods--> http://x2source.com/forums/index.php?showtopic=3380
http://yoyodyne.bravehost.com/
Shortcut to Mods--> http://x2source.com/forums/index.php?showtopic=3380
-
- Posts: 671
- Joined: Fri, 12. Mar 04, 08:14
You did something wrong... 
This file probably contains checksums of all "data" files so X3 can check if the files have been altered in any way. Just my guess...
You need to open maps\x3_universe with X3E Galaxy Editor to add sectors. Adding weapons to factories is best done with script but it can be done in galaxy editor as well.
You should trim the file content posted above - it is breaking the forum layout.

This file probably contains checksums of all "data" files so X3 can check if the files have been altered in any way. Just my guess...
You need to open maps\x3_universe with X3E Galaxy Editor to add sectors. Adding weapons to factories is best done with script but it can be done in galaxy editor as well.
You should trim the file content posted above - it is breaking the forum layout.
-
- Posts: 213
- Joined: Sat, 8. May 04, 22:29
So, I can add new names with the Galaxy editor? Not just "string"?
Bubba Fat is where it's at!
http://yoyodyne.bravehost.com/
Shortcut to Mods--> http://x2source.com/forums/index.php?showtopic=3380
http://yoyodyne.bravehost.com/
Shortcut to Mods--> http://x2source.com/forums/index.php?showtopic=3380