MinMax Spaz

MinMax-Games.com

The water cooler of outer space
  
It is currently Mon 27 Mar, 2017 3:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Changing Mount Types
PostPosted: Tue 24 Jan, 2017 4:07 am 
Offline
Shortbus

Joined: Tue 24 Jan, 2017 3:50 am
Posts: 2
original question: So basically I've been modifying just about every weapon/equipment item in the game for a while, but more recently I decided I would try modding ships. I was wondering if there was a way to change what type of weapon mount a ship has. In this case I want to try giving the Raven two turret mounts as apposed to the standard shooter mounts.

edit: I was able to look at the Tug's file structure to figure it out. This info may be somewhere else in the forum (I couldn't find it though) but I'll go ahead and post it here in case anyone else needs this (if anyone else is still modding this game).

Everything you will need is in the Space Pirates and Zombies\mods\Template\gameScripts\datablocks\ships\Hulls folder. Which file you use depends on which ship you want. In this case I'll use the Raven since that's the only one I've altered, which means you want to load up mediumHulls.cs (I just use Notepad, but I'm sure there are better programs out there). Scroll through the file until you find your ship, which for me is near the bottom since it's a bounty hunter ship. It's also labeled as HullBounty_Medium_01 instead of HullRaven, but that's not too hard to figure out (I think it's the only medium hull with drones). Scroll through the stats until you find the line "externalLinkPoints". This section should look something like this:

Initial Stats | Click to toggle: +
externalLinkPoints = "6 7 8 9 10 11 12";

externalLinkType6 = $LINK_Shooter;
externalLinkSize6 = $SLOT_MEDIUM;

externalLinkType7 = $LINK_Shooter;
externalLinkSize7 = $SLOT_MEDIUM;

externalLinkType8 = $LINK_Drones;
externalLinkSize8 = $SLOT_LARGE;

externalLinkType9 = $LINK_Utility;
externalLinkSize9 = $SLOT_MEDIUM;

externalLinkType10 = $LINK_Utility;
externalLinkSize10 = $SLOT_MEDIUM;

externalLinkType11 = $LINK_Utility;
externalLinkSize11 = $SLOT_MEDIUM;

externalLinkType12 = $LINK_Utility;
externalLinkSize12 = $SLOT_MEDIUM;

Since I'm changing the shooter mounts I'm only interested in slots 6 and 7. By looking at the Tug's code near the top of the page I was able to come up with this as the altered code:

New Stats | Click to toggle: +
externalLinkPoints = "8 9 10 11 12";
turretLinkPoints = "6 7";

hullTurretSize6 = $SLOT_MEDIUM;

hullTurretSize7 = $SLOT_MEDIUM;

externalLinkType8 = $LINK_Drones;
externalLinkSize8 = $SLOT_LARGE;

externalLinkType9 = $LINK_Utility;
externalLinkSize9 = $SLOT_MEDIUM;

externalLinkType10 = $LINK_Utility;
externalLinkSize10 = $SLOT_MEDIUM;

externalLinkType11 = $LINK_Utility;
externalLinkSize11 = $SLOT_MEDIUM;

externalLinkType12 = $LINK_Utility;
externalLinkSize12 = $SLOT_MEDIUM;

Booted it up in-game and it seems to work. Make sure to check your semi-colons (I was missing one and it broke my mounts and crashed the game).

edit2: Upon trying various mount type/size tweaks I have found that this works on only some of the ships. Several of them seem to refuse to change their mounts and I have to assume that there is either another location where their mounts are specified and I haven't found it yet, or that for some reason they aren't getting the mount data from the mod folder. Either way, I will continue to try to pin down what's going on and will update this post when/if I figure it out.


Top
 Profile  
 
 Post subject: Re: Changing Mount Types
PostPosted: Thu 16 Feb, 2017 1:42 am 
Offline
Hound
User avatar

Joined: Thu 15 Sep, 2011 3:54 am
Posts: 1397
Hi,

There is two files. One is for modifying the "base hull" and one is for modifying "ship spawns". If the two don't match, then it generally defaults to the "ship spawns" file, though, then you can't change it.

The base hull files are found in gameScripts/datablocks/ships/hulls/.

The ship spawns files are found in gameScripts/datablocks/ships/designs/.

To change a shooter mount to a turret mount you would need to do several things. (ignore the [[ ]] )

1) State the hardpoint number of each turret to be used, in "Hulls". Example [[ turretLinkPoints = "6 5 4"; ]]
2) State the size of the turret used for each hardpoint number, in "Hulls". Example [[ hullTurretSize6 = $Slot_SMALL; ]]

THEN... for EVERY ship spawn for that specific hull, you must:
3) State the turret link hardpoint number and size of the turret in that link, in "Designs". Example [[ turretLink6 = "SmallTurret"; ]]
4) State the turret weapon hardpoint number and size of the weapon in that link, in "Designs". Example [[ turretWeaponLink6_1 = "LargeEmitter_Civ"; ]]

End result? Tons and tons of work just to change a single ship. But if you want to do it, definitely go for it. If you want a ship with more links / changed links, and don't want to do the work all yourself, you can grab the mod "BigBeef"... it adds a bunch of other stuff too, like Quad Turrets and improved beacons/motherships, but...

IF you only want to do the Raven, then you'll have to modify the hardpoints in the "Hulls" file, then you will have to change EVERY single Raven Ship Spawn as well in the "Designs" file to do it.


Top
 Profile  
 
 Post subject: Re: Changing Mount Types
PostPosted: Thu 16 Feb, 2017 9:47 pm 
Offline
Volley
User avatar

Joined: Wed 25 Apr, 2012 8:44 am
Posts: 610
Thanks for reminding me WHY I haven't done the final part of BigBeef.

Although it's only the Stations IIRC.

Haven't forgotten about BigBeef Either.

_________________
My BigBeef mod, Quad Turret mod & Master Dredge base Mod.
Modding for MY OWN Pleasure. :twisted:
Please Help with LoBWaM (List of Base Weapons and Modules)
Official SPAZ mod package (v2.0) Cause people cant find links anymore


Top
 Profile  
 
 Post subject: Re: Changing Mount Types
PostPosted: Thu 16 Feb, 2017 11:13 pm 
Offline
Hound
User avatar

Joined: Thu 15 Sep, 2011 3:54 am
Posts: 1397
Its okay, GTX2GvO. Its understandable if you haven't finished it... what with things taking a long time to do and due to having most of the old guard, that kept the forum lively and active and supportive, disappear around the same time as when SPAZ 2 showed its first trailer and thus the number of people to help test it and give encouragement have disappeared. Its sad; I remember the days fondly of when these forums were active, mods were coming out by many talented people, the wiki was getting updated, and everyone was just making this community great. Then SPAZ 2 finally showed up and almost everyone disappeared and now there is only a few of us old guard left.

I believe it is stations, and possibly mothership weapon tweaks (as the low-level weapons on the Chap 3 / 4 ship don't do much at all against zombies or bounty hunters). For stations in particular, the fact that only Mining bases could reliably defend themselves, as drone bases weren't a threat with EBC, Particle Cannons or PDs... same with missile bases. Also, I don't know if you had planned to do Pirate bases for those ambient missions.

Well it is great you haven't forgotten about it. Question is, do you really want to finish it, what with almost no one left to enjoy it? I still play SPAZ 1, and honestly after playing BigBeef I find it difficult to play vanilla... so I'd play it. But as most of the regulars of the forum are lone gone... and Richard/Blorfy haven't touched SPAZ 1 in 5 years and its unlikely they will ever touch it again or even update the toolkit (I asked Richard about that and he said he/Blorfy are too busy with SPAZ 2 and thus if they are going to update the toolkit it isn't going to be for at least 1-2 years). Thoughts?

(Also sorry to OP for side-tracking this post... assuming the OP ever comes back)


Top
 Profile  
 
 Post subject: Re: Changing Mount Types
PostPosted: Thu 16 Feb, 2017 11:45 pm 
Offline
Volley
User avatar

Joined: Wed 25 Apr, 2012 8:44 am
Posts: 610
I need to get my toolkit back in order to start on the mod again.
Cause a main part was altering and optimizing the linkpoint positions.
One of the tools was in fact the TorqueGameBuilder or more precise a not owned one. :/

What bugged me with that was the 30 linkpoint limit, which to this day I'm still thinking of ways to overcome one way or another.
But that requires a similar effort as making the quad turret mod in regards to sprites and stuff if not more effort then that.

Another main issue was that certain T2 and T3 bases seemed to be swapped. Most noticeably the mining bases, but I think science was also swapped.
On vanilla this wasn't that much of an issue, but when I'm really done with stations you would clearly see the difference.

I should still have all the files or easily continue from the latest build I released, cause that was the better part of the way mods for SPAZ was released.

And yes, I still desire to get BigBeef in a "released" 1.0 state.
At least before I get a chance on starting with BigBeef2* if you catch my drift. ;)


*Depends on possibility's

_________________
My BigBeef mod, Quad Turret mod & Master Dredge base Mod.
Modding for MY OWN Pleasure. :twisted:
Please Help with LoBWaM (List of Base Weapons and Modules)
Official SPAZ mod package (v2.0) Cause people cant find links anymore


Top
 Profile  
 
 Post subject: Re: Changing Mount Types
PostPosted: Fri 17 Feb, 2017 4:27 am 
Offline
Hound
User avatar

Joined: Thu 15 Sep, 2011 3:54 am
Posts: 1397
Yah it was definitely annoying that Torque didn't have a demo build that someone could use to do modding with.

Do you know what caused the 30 linkpoint limit? If it was an integer, it should have a minimum of up to 127-128 as a value (with the other 128 as negative values to add up to 256). What happens when you use 31 linkpoints?

I seem to recall, at least for Insanity when I was still modding, that I managed to get a triple turret to work on a medium/large turret, so in theory you should be able to do quad on large or medium.

Yes, I noticed that as well when modding bases. The T2 and T3 ones are swapped. Because really, the T2 mining base is far more effective than the T3 mining base for personal defense and mining the mother-rock.

Well, I think it is great that you want to do a V1 of BigBeef. I just hope you don't run into issues like I or Warstalker ran into, because the files we needed aren't available in the toolkit.

Yah, I think SPAZ 2 could use a BigBeef2!... when modding comes out for it at least.


Top
 Profile  
 
 Post subject: Re: Changing Mount Types
PostPosted: Fri 17 Feb, 2017 9:57 am 
Offline
Volley
User avatar

Joined: Wed 25 Apr, 2012 8:44 am
Posts: 610
If you looked up the stations in the usable gamefiles you would see why I know they are swapped.
All stations and ships are neatly ordered in there, yet with stations certain last two are swapped when you encounter them in game.

When you look them up in the Ctrl+S spawning menu they are not swapped in the listing then.
A way to fix this is to figure out the games hook to each station (probably the internal naming) and swap those around in the code.
But that's crude bugfixing, that should be done to vanilla.

The main issue for stations is that I do not have enough linkpoints for static missile mounts.
So I would need to make a quad version (or something) of the fixed turret mount, place it where you get the missiles (-z plane iirc) and hope for the best.

Not sure what would happen if I try to use more. Don't remember trying it.
Although I think you'd get the same kind of error as when you misspell a mounts name.

They size of a mount or point is no issue. They have no effect on the amount of mounts, so I can use bigger or smaller where I want to.

My modding is luckily mostly contained within most of the mod toolkit, maybe if I wanted to alter certain tutorial info bits to reflect the changes I made.
I will however not hit the hard Datablock limit Warstalker did. I'm not adding that much new stuff into the mix.
Maybe a new weapon(mount) here and there, but not in that extent.

My first SPAZ2 mods will likely be map mods, sandbox tweak modifiers and perk progression modifications.
*cough* Bigger map, more cores, more things to do around *cough*

_________________
My BigBeef mod, Quad Turret mod & Master Dredge base Mod.
Modding for MY OWN Pleasure. :twisted:
Please Help with LoBWaM (List of Base Weapons and Modules)
Official SPAZ mod package (v2.0) Cause people cant find links anymore


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group