AtomicTorch Studio Forums

VoidExpanse => Modding info => Topic started by: MrVoff on November 20, 2013, 01:05:21 AM

Title: Modding the VoidExpanse
Post by: MrVoff on November 20, 2013, 01:05:21 AM
Hello.
I was following this project for some time since someone posted a thread on bay12 forums. To me it looks like this game might be quite interesting to play.
But my question is about modding. You mentioned several times on your website that you are working on some scripting api. Where can I read more about it and how is it going to work?
Basically, how is modding going to work for this game?

Voff.
Title: Re: Modding the VoidExpanse
Post by: Lurler on January 16, 2014, 03:03:56 AM
Sorry for late reply, but I missed your thread somehow :)

Quote from: MrVoff on November 20, 2013, 01:05:21 AM
I was following this project for some time since someone posted a thread on bay12 forums. To me it looks like this game might be quite interesting to play.
Thanks :)

Quote from: MrVoff on November 20, 2013, 01:05:21 AM
But my question is about modding. You mentioned several times on your website that you are working on some scripting api. Where can I read more about it and how is it going to work?
Basically, how is modding going to work for this game?
We are planning to have a wiki with detailed info on how modding works, and all APIs available for modders.

But generally modding is very simple for VoidExpanse, when the game becomes available you could just open core.cpk file (it is actually just a zip file) and see all insides of the game. You can then create a mod that would replace any resource or add a new one.

We will also make available some modding tools that we use ourselves in development of the game.

If you have any particular questions feel free to ask!
Title: Re: Modding the VoidExpanse
Post by: Jax43 on April 03, 2014, 03:34:59 AM
I am wanting to make a mod that makes my starting prospector ship very strong, how would I make that work? Thanks:)
Title: Re: Modding the VoidExpanse
Post by: Lurler on April 03, 2014, 03:52:02 AM
Quote from: Jax43 on April 03, 2014, 03:34:59 AM
I am wanting to make a mod that makes my starting prospector ship very strong, how would I make that work? Thanks:)
It's really easy. You could start by opening the original data archive of the game. Just rename it to core.zip and you can open to see what's inside.
There you can modify any of the game data. It's really as easy as editing a few values.

Though, I don't think it would be much fun making an uber ship :)
Title: Re: Modding the VoidExpanse
Post by: 049er on April 12, 2014, 09:48:35 AM
Hey im just wondering if there is a way to make my own hulls and what software to use ?
Thanks
Title: Re: Modding the VoidExpanse
Post by: Tiaexz on June 07, 2014, 07:43:46 PM
Quote from: 049er on April 12, 2014, 09:48:35 AM
Hey im just wondering if there is a way to make my own hulls and what software to use ?
Thanks

I recommend Notepad++
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 16, 2014, 12:57:49 AM
Any chance you could list out what modding tools you might eventually be releasing?  Just a bit of curiosity on my part.

Without them, and this seems something that would go well on the wiki, it would be grand if we could get a list of what some of the more obscure variables mean and the settings for each.  A good example might be ammo_meter; I assume that 1 means a ballistic/missile meter and 2 means a percentage laser meter, but it'd be handy to have information like that at one's fingertips. :)

One specific one, though: for particle effects in some places it seems to list out four variables.  I figure three have to be RGB values; fourth might be luminosity or something?  Any information on this would be handy as I do a bit of my tinkering.

Edit: Two more quick questions for when someone has a second. :)  First, for homing weapons, is the listed value for homing under projectiles degrees per second of tracking?  And second, if I create an entirely new item will it automatically populate into station stores by itself or do I need to add it to a list of 'shop gear'?
Title: Re: Modding the VoidExpanse
Post by: Lurler on June 19, 2014, 01:15:39 AM
Quote from: Hammish on June 16, 2014, 12:57:49 AM
Any chance you could list out what modding tools you might eventually be releasing?  Just a bit of curiosity on my part.
Well, I can tell you what we have so far at least.
1. Physics application that allows us to create physics definitions for the ships, stations, etc.
2. Mod packer (console based and windows application).
3. Items agreggator - allows to see all items sorted by different properties, makes it easier to balance things.
But apart from the physics app the rest isn't really that important. You can create any mods just by editing text files.

Quote from: Hammish on June 16, 2014, 12:57:49 AM
Without them, and this seems something that would go well on the wiki, it would be grand if we could get a list of what some of the more obscure variables mean and the settings for each.
No problem, you can just ask any particular questions and I will either answer here or create a separate wiki article.

Quote from: Hammish on June 16, 2014, 12:57:49 AM
One specific one, though: for particle effects in some places it seems to list out four variables.  I figure three have to be RGB values; fourth might be luminosity or something?  Any information on this would be handy as I do a bit of my tinkering.
The fourth one is alpha, so it is the standard RGBA notation.

Quote from: Hammish on June 16, 2014, 12:57:49 AM
First, for homing weapons, is the listed value for homing under projectiles degrees per second of tracking?
Tracking is defined in the ships slots and is not linked to weapons themselves.
While homing is a property of a projectile and is specified inside the weapon.

Quote from: Hammish on June 16, 2014, 12:57:49 AM
And second, if I create an entirely new item will it automatically populate into station stores by itself or do I need to add it to a list of 'shop gear'?
As far as I know - yes, it will be available in shops automatically :)
But it will not be added to drop lists from pirates/aliens because these are defined manually. But they can be changed to be dynamic too, though.
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 19, 2014, 08:48:56 AM
Quote from: Lurler on June 19, 2014, 01:15:39 AM
Tracking is defined in the ships slots and is not linked to weapons themselves.
While homing is a property of a projectile and is specified inside the weapon.

Sorry, chose my words poorly. :)  I've tinkered with the chassis a bit and know about the tracking in there, I was referring specifically to the homing value under the projectile tag, yep.  Just curious as to what the value actually means in hard math.  If, say, a missile has a homing of 50, I figured it meant either it could continue homing if the target was within a 50-degree arc, or it could turn at 50 degrees per second, or something like that... but I wasn't sure, so I figured I'd ask.

Thanks for all of the rest of the answers, they helped a ton!  Good deal on the modding tools as well, that'll help me a ton once you toss it up given the nature I've what I've been tinkering with, mostly just some odd/exotic weapons and modules.
Title: Re: Modding the VoidExpanse
Post by: Lurler on June 19, 2014, 06:13:27 PM
Ah, yes. It is degrees per second. Most of the values if they are not set as-is are per second.

As for the tools, I will ask our guys to polish the physics app so we can release at least this one.
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 20, 2014, 12:02:09 AM
Rock on, and thanks again for all the help!
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 22, 2014, 11:10:16 AM
Quick question of the day: armor value, is that a percentage of damage nullified or a flat amount off every shot that lands?  IE, if a ship has 20 total armor, is that -20 damage/attack or 20% less damage to hull?
Title: Re: Modding the VoidExpanse
Post by: Lurler on June 22, 2014, 05:27:41 PM
Flat value removed from incoming damage.
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 25, 2014, 03:07:17 AM
Slightly more involved question for today!  (By the way, no rush on answering any of my questions.  I don't want to get annoying or take away from work or game dev.)

How do scattering munitions work?  I see that for the Scatterpack mine, it basically just has an additional projectile field with the quantity and properties of submunitions (5 smaller mines for the Scatterpack).  It also has a Scatter Time attribute tag, but for lack of a better term I'm not really sure what each of the attributes does.  So, a few basic questions!

1.  Does the scattering take place whenever the first projectile is destroyed?  (IE, let's say I take the mine and make it a shell.  When I shoot it at something and it impacts on the hull of an enemy, will it still scatter or is it just lost?)

2.  If not, what determines when the weapon goes into 'scatter mode' and separates into the submunitions?

3.  Do weapons that scatter need to be destructible objects, with an associated .obj file, or can they be simple sprites?

Thanks in advance for any answers, or if you have an easier way to explain the process behind scattering weapons. :)
Title: Re: Modding the VoidExpanse
Post by: DLirry on June 25, 2014, 07:40:39 PM
Hello! I will try to answer these questions.
1. No.
2. There is a parameter in projectile properties (in weapon xml) - something like 'scatter delay'. It determines when projectile splits into smaller parts.
3. They can be sprites of course.

Scattering projectiles are, actually, quite easy. To make weapon's projectile to scatter, you need to add a few more projectiles with parameters
<scattering>
   <base_projectile>0</base_projectile>
   <scatter_time>1.2</scatter_time>
</scattering>
( see weapon_scatterpack.xml for example )
First parameter is an index of base projectile, from which scattering parts will be emitted. Second parameter - is a time, on which projectiles will be emitted.
Base projectile must exist to emit scattering projectiles. And base projectile may not be destroyed after that!

I hope I gave enough information on this matter to work with.
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 25, 2014, 10:06:30 PM
That's about how I figured it worked, it just... doesn't seem to work in-game. :)

I actually get the same thing when I try to use the default Scatterpacks.  The mine seems to float out like it should for second and a half, looks like it explodes, but I never see any scattered projectiles come out.
Title: Re: Modding the VoidExpanse
Post by: Lurler on June 26, 2014, 01:47:49 AM
Quote from: Hammish on June 25, 2014, 10:06:30 PM
That's about how I figured it worked, it just... doesn't seem to work in-game. :)
I actually get the same thing when I try to use the default Scatterpacks.  The mine seems to float out like it should for second and a half, looks like it explodes, but I never see any scattered projectiles come out.
Hm, it could be a bug... But either way we rewrote the mine system internally to make it better so even if it was a bug it will now work for sure. It will be in the new release.
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 26, 2014, 03:34:33 AM
Nice!  Will look forward to it, then, along with the new ship.  Anything else major coming in terms of the way the weapon scripting works?  (That's been the majority of work I've been putting in on my little side project; am actually very close to dropping a version 0.1 down for people to test out the new light-class weapons and a slightly-revised skill tree for them.)
Title: Re: Modding the VoidExpanse
Post by: Lurler on June 26, 2014, 03:48:12 AM
Quote from: Hammish on June 26, 2014, 03:34:33 AM
Nice!  Will look forward to it, then, along with the new ship.  Anything else major coming in terms of the way the weapon scripting works?  (That's been the majority of work I've been putting in on my little side project; am actually very close to dropping a version 0.1 down for people to test out the new light-class weapons and a slightly-revised skill tree for them.)
Well, there will be several new weapons along with GFX and SFX, including gauss cannons. You might use some of these resources in your mod.
But most of the new stuff is for the game in general. A whole lot of new stuff and fixes for the old things.
Title: Re: Modding the VoidExpanse
Post by: Hammish on July 30, 2014, 08:29:32 PM
Quick question of the day:

What does damage type actually influence?  Is there a difference between energy, ballistic and explosive in terms of how they interact with shields and hull/armor?

Also, as a thanks, the tracking_delay attribute is awesome.  I've made a fun little MIRV for the mod using that, as well as a (woefully unbalanced and thus not in the public release) drone that flies forward slowly, spitting other drones that activate after a moment to engage locked targets.  Fun stuff!
Title: Re: Modding the VoidExpanse
Post by: Lurler on July 31, 2014, 03:26:02 AM
Nothing at the moment :) We have some ideas for the future, so we decided to add it to allow for backwards compatibility.
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on July 31, 2014, 06:05:56 AM
Projectiles with damage type "explosive" apply damage on area. The "radius" and "max_radius" parameters used to determine how much damage should be applied (if distance < radius, full damage will be applied, if > max_radius, no damage will be applied, and distance between radius and max_radius will reduce damage linearly, so it will be less damage if you far, but still inside the max_radius). Also there are parameter "impulse" - to control how much impulse should be applied to the ships in a explosion area.
Title: Re: Modding the VoidExpanse
Post by: Lurler on July 31, 2014, 06:10:48 AM
That's a different thing. It is projectile type. But I think he talks about the "dmg_type" property.
Either way, good explanation!
Title: Re: Modding the VoidExpanse
Post by: Hammish on July 31, 2014, 01:06:31 PM
Right right, the impulse I had figured out and I assumed radius and max_radius were used in the same way as range and max_range.. but it's good to have it confirmed. :)  I actually tweaked with both impulse and tracking_delay to make my MIRVs; the small impulse from the blast when the primary round detonates knocks all the submunitions outward a small distance in a scatter pattern before the tracking kicks in and leads them toward the target from multiple vectors.

Thanks for the info on damage types as well, too.  I saw something in one of the weapon descriptions about being 'effective against shields' so I thought mebbe something got changed.
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 21, 2014, 04:16:25 AM
Time for a new Question of the Day!  Bet you missed these, eh? :)

How exactly do strafing, cruise and no_energy speed work in the game in terms of calculation?  Acceleration, max speed, maneuver... these all seem self-explanatory and can be modified by both flat amounts (on gear) and percentile amounts (normally on skills or hulls, it'd seem).   But strafe, cruise and no_energy all seem to be 'special' instead of 'calculate' and I have no idea what determines the base strafe speed of a given hull.  I thought maybe it was a derived value from acceleration or maneuvering, but I'm not sure.

Or, put another way, using the Advanced Strafing skill as an example, it says it provides 0.25 to strafe_speed_special.  Does this represent a 25% gain in strafe speed or is it the equivalent of 0.25 'force units' in the same way that engines apply force using maneuver/acceleration?

Sorry if the questions are worded confusingly.  Essentially I am trying to create both a hull and some equipment that are better at strafing.
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 21, 2014, 05:26:57 AM
And then a second unrelated question: can a tech have multiple requirements like pieces of gear does?  For instance, can I require a capstone skill to require rank 3 in all of the previous skills, and if so, what's the format for the code?  Just use <requirement> tags nested inside the <requirements> overhead tag for each combo of skill name and required level?
Title: Re: Modding the VoidExpanse
Post by: Lurler on August 21, 2014, 08:04:22 PM
Hammish, sure, let me explain.

All these parameters work in a different way than most other as you noticed. They don't work by themselves, instead they work as a multiplier to the max speed.
By default, if I am not mistaken, it is: cruise 2X, reverse 0.6X, strafe 0.4X, no power 0.4X, so when you advance these skills they are basically adding value to these multipliers. So +20% to "something" actually gives you a bonus of 20% of your normal speed (thus +0.2 to a particular multiplier).

For skills - no, the skill can only have one prerequisite skill and character level requirements. It is done so because the trees are generated automatically, so we have to insure that the skills only have one parent to generate the tree properly.

Now, but in exchange for the answer could you please edit these answers into the wiki so other players could use the info as well? :) If it is not too much trouble of course.
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 21, 2014, 11:39:53 PM
I can... try?  It's actually been ages since I worked with anything Wiki, but I'll hop over and see. :)

Just a quick follow-up, as well: does the same thing apply to acceleration as well, then?  IE, if your max strafe is 40% of your normal max speed, is your acceleration while strafing also 40% of normal, or is it just a max speed adjustment?

And thanks for the snappy answer. :)
Title: Re: Modding the VoidExpanse
Post by: Lurler on August 22, 2014, 02:08:23 AM
Quote from: Hammish on August 21, 2014, 11:39:53 PM
Just a quick follow-up, as well: does the same thing apply to acceleration as well, then?  IE, if your max strafe is 40% of your normal max speed, is your acceleration while strafing also 40% of normal, or is it just a max speed adjustment?
No, it doesn't change with increased speed since these are independent. So, even if you have 10X cruise speed the acceleration would still be the same. BUT! When you activate the cruise mode your acceleration is cut to 1/3, thus making you accelerate 3 times slower. This is a balancing measure to prevent people using cruise during combat, and to make fleeing pirates a bit more difficult.

Quote from: Hammish on August 21, 2014, 11:39:53 PM
And thanks for the snappy answer. :)
No problem :)
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 22, 2014, 07:56:45 AM
That actually makes a lot of sense and explains some of the stuff I noticed in the game.  Flying earlier ships that are light, even with limited acceleration you tend to get to top cruise fairly quickly... but once you're in something big with a lot of mass it takes a loooong time to reach your top end. :P  That makes me think of another question, though: does the ship mass contribute directly to any sort of handling, or is it only used for things like collisions/ramming?  I always assumed that it at least offset acceleration, since the default ship hulls at the large end all seem to have negatives to max speed and maneuver but nothing for -acceleration.

Also, let me summarize here before I change anything for public consumption, just to make sure I have everything right! :)  Does this look correct?

Maximum normal speed forward is speed_max. :P
Maximum normal speed in reverse is speed_max * reverse modifier (default 0.6)
Acceleration toward maximum speed is dictated by Acceleration.
Turning ability per second is determined by Maneuver
Cruising maximum speed is speed_max * cruising modifier (which begins at 2.0)
Cruising acceleration is acceleration * 0.33 (roughly).
Strafing max speed is speed_max * strafing modifier (default 0.4)
Strafing acceleration is the same as acceleration.
Title: Re: Modding the VoidExpanse
Post by: Lurler on August 25, 2014, 02:12:39 AM
Mass of the ship does affect acceleration. Since we are using real physics it simply works as you'd expect in reality - more massive objects require more energy to be pumped into to give them momentum. Basically normal inertia.

As for your formulas - everything is exactly right :)
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 26, 2014, 01:54:06 PM
Awesome. :)

NEXT QUICK QUESTION: How does the damage calculation for beams go?  From what I can tell, the damage listed is per second.  So...

If I set a beam to 50 damage, 1s duration, it'll do 50 damage over 1s.
If I set a beam to 50 damage, 2s duration, it'll do 100 damage over 2s (50 DPS).

So how much damage will the beam do if I set it to 50 damage, 0.5s?  I'm not sure if it'll do 50 in half the time, or just 25 and waste the rest. :)

Edit: I think I figured out what my issue was.  I made a pulse laser and forgot to set projectile type to 1, so it was trying to calc it as a per-shot weapon. >.>
Title: Re: Modding the VoidExpanse
Post by: Lurler on August 26, 2014, 08:01:59 PM
Yes, the beam damage is per second. The duration doesn't matter in this case.
Armor also works per second in case of beam weapons.
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 26, 2014, 10:54:40 PM
Good to know on the armor.  I had suspected, but y'know. :)

And just means a bit more math for me, on any beam under 1.0 duration, really.  For instance, on the pulse lasers I wanted them to do 50 over 0.5 sec, so I set the damage to 100 and voila, issue solved!
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 28, 2014, 05:43:17 AM
Next odd question for when you guys have a second or two. :)

For beam weapons, does duration_prepare and duration_complete actually affect damage numbers, or do they just impact the visual effect of the beam?
Title: Re: Modding the VoidExpanse
Post by: Lurler on August 28, 2014, 08:46:18 PM
Yes, these are only for visual effects.
Title: Re: Modding the VoidExpanse
Post by: Hammish on August 30, 2014, 04:05:21 AM
Just the answer I was hoping for.  You can make some cool wobbly pulse lasers by using the grow/shrink look of them. :D
Title: Re: Modding the VoidExpanse
Post by: Hammish on September 03, 2014, 09:52:51 PM
QOTD: Is it possible to adjust character level higher than 1 when creating a new character?

I ask this merely for the purposes of creating test characters.  It's a pain to either level a character and hunt down the stuff I want to test/experiment on or temporarily drop the usable levels on items/skills down to 1. :P
Title: Re: Modding the VoidExpanse
Post by: Lurler on September 04, 2014, 02:42:41 AM
Hm. IIRC - no :)

But you can use cheat command in SP that would make you into an almost top level character.
Here's how: (/pwn)
Title: Re: Modding the VoidExpanse
Post by: FlessenGreendart on September 04, 2014, 04:12:34 AM
Haha, brilliant command!

That'll come in handy when testing ships. On that note, do you have an add hull command? As it is at the moment, I'm having to drop the price of the hull, and throw in a civillian flag
Title: Re: Modding the VoidExpanse
Post by: Lurler on September 05, 2014, 12:14:51 AM
Yes, there are a lot of different commands available, all of them are listed in our wiki here - http://wiki.atomictorch.com/Main_Page
Title: Re: Modding the VoidExpanse
Post by: FlessenGreendart on September 05, 2014, 01:32:13 AM
Brilliant, thanks for that, that'll make test a lot easier!
Title: Re: Modding the VoidExpanse
Post by: Hammish on September 07, 2014, 03:26:51 AM
That is indeed awesome and a huge help.  All of it. :D

And my question for the day (it's been a while!):  Is there any way to set the Z-layer for weapon effects?  I've noticed they always seem to draw under the ship, at least the ones I do, and that looks odd for weapon fire coming from top-mounted turrets. :)
Title: Re: Modding the VoidExpanse
Post by: Lurler on September 07, 2014, 11:32:07 PM
Well, when you define weapon position you can set any Z value. Then the fire will be coming our of that position on the ship. As with other weapons that are already in the game. It is defined in the weapon slots of a ship. A particular XYZ position.
Title: Re: Modding the VoidExpanse
Post by: Hammish on September 08, 2014, 01:38:13 AM
Right, that I get, but even for weapons that are mounted on the top, some of my effects seem to appear drawn under the ship.

Example: the energy hardpoint on the Shuttle is coords -0.227;0.000;-0.203, so from the cockpit it's toward the back and elevated slightly.  Should be well above the centerline of the ship (since it's a roof-mounted turret).  But if I fire a non-beam projectile from it, the projectile isn't visible until it move out from the location occupied by the ship; for all intents and purposes the shot appears to be either inside or under the ship, instead of originating above it.

Not a huge priority for you guys, it just looks a little jarring to me now that I've noticed it.  For smaller, darker shots it barely even registers but you can see the effect clearly if you use a slow-moving missile projectile or a brighter sprite.
Title: Re: Modding the VoidExpanse
Post by: Lurler on September 08, 2014, 01:46:39 AM
That is strange. It doesn't happen in vanilla game... at least for us here. Could you maybe make a gif animation or a video of that? I will investigate what could be causing this.
Title: Re: Modding the VoidExpanse
Post by: Hammish on September 09, 2014, 04:31:01 AM
Here are two good example, I think. :)

http://i.imgur.com/rrbRzjk.jpg
http://i.imgur.com/FOVTOt0.jpg

The first is an effect (if a horrible one) from a BTC test build, the second is a screenshot taken from vanilla, standard Autocannon 40P.

One the second screenshot, you can see that the weapon has just been fired and can just barely see the shot starting to come out from the center of the hull.  For the second, the weapon effect gave me a chance to demonstrate better; if you look at it you can actually see where the effect is clipping through the center hull but drawing over the wingtip on the left-side pod.  My guess (and this is just conjecture based on what I have seen in game) is that the game is generating weapon effects right on 0.00 z-plane, but because most of them have no thickness on the z-axis (being sprites and all) the engine is just treating them as planes.  Since the hulls (to the best of my knowledge from doing weapon hardpoint placement) are centered more or less right around 0,0,0z, so an effect generated on 0,0,0 is going to bisect the hull, which is for all the world what appears to be going on with those pictures. :)

Also, it might be helpful for me to note that the issue does NOT seem to occur with any sort of beam or ray weapon, I assume because the beam is actually generated from a X/Y/Z coord to an X/Y/Z coord, instead of being generated on X/Y with Z defaulting to 0 like with sprite stuff.  Missile weapons also seem to generate at 0 z-coord but you see them appearing out of the hull earlier because they are generated as true 3D objects (and thus, once generated, have surfaces above 0, ect)

Also, I want to say again that this is noooot a huge thing.  It's just a small graphical thing that only occurs for a fraction of a second after firing weapons, and I would prioritize it pretty low.  I just bring it up because I noticed it and because it -might- be more prevalent and noticable as the mod community takes off and people design larger hulls.  For a good example, snag Flessen's Millenium Falcon off his link and try replacing the weapons with some sprite-based ones; the hull clipping is a lot more notable.
Title: Re: Modding the VoidExpanse
Post by: Lurler on September 09, 2014, 07:16:49 PM
Hm, you are right. It does seem like a bug. Probably just simple thing like missing the proper z assignment. Thank you, it should be easy to fix.
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on September 09, 2014, 08:55:16 PM
The projectiles are physical objects, so they spawn at Z=0 as all other physics objects do (the rockets/mines also!) - simply because the game has a 2D physics engine!

We decided to keep it simple - it's is hardly noticeable at all for majority of projectiles.

I have an idea - we can offset projectile by Z only on client (to the height level of the turret fire point) and then decrease it gradually with distance from its source to zero value. I'm not sure though, how good/bad it will look... zero Z is important as collision point won't look right if Z shifted.
Title: Re: Modding the VoidExpanse
Post by: Hammish on September 10, 2014, 01:02:03 AM
Right, that was another reason I figured it'd be low-priority.  It's barely an impact on the existing hulls, it's only really noticable with user-designed hulls that have the hardpoints along the top of the hull.  I've actually found other workarounds for it as well, the most simple of which being to just take some of the more odd-looking top turrets and making them bottom turrets instead, thanks to the handy bit of code ya stuck in for flipping the orientation. :)  Voila, it appears a lot more natural on those hulls, because you're not expecting to see the projectile until after it's cleared the hull anyway.

Your idea sounds like it might work, though.  I mean, the height on the turrets isn't all that high off the Z-axis anyway, so even if a collision doesn't appear -right- on, it'll be close enough to be almost indistinguishable.  I still agree that it's not a huge deal and not game-breaking by any means, but it seems like it could be something to look into a bit further down the road.  (Like once Steam is chugging along more heavily and, hopefully, people are populating the workshop with all sorts of gorgeous ships.)

I kinda feel badly for bringing it up at all, now, as it seems a little nitpicky.  *sheepish look*
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 11, 2014, 01:31:53 AM
Necroing my old thread for reasonably-easy (I hope!) occasional questions. :)

Today's: What's the metric used for the frame delay on weapon sprites?  I figured it was in milliseconds, so if the shot duration is set to 1.5 I assumed I would need to set the delay to 150 to have all the frames play perfectly by the end of the shot.  However, something appears to be slightly off; if I set this and then hold down the trigger the first few shots appear just fine, but after a little while they start to desync and the shots coming from the weapon are starting deeper and deeper in the frame count.  So while the normal shot looks like a small fireball that expands into a big fireball by the end of the shot; after a minute or so of firing the gun instead is shooting mid-sized fireballs that expand to large and then suddenly morph back to tiny, as if the animation was starting around frame 5 or so.

If you'd like, as time allows, I can send ya a copy of the weapon in question for testing, but as usual no rush at all.  Mostly interested to know if just getting the correct delay number in there would fix the issue, or if there is a code way to demand that each and every shot starts at frame 0 with 0 on the delay counter.  Thanks in advance!
Title: Re: Modding the VoidExpanse
Post by: Lurler on December 11, 2014, 02:57:07 AM
Not exactly sure what you mean, but if I understand you correctly then it's in seconds, not in ms.
Example:
Civilian laser.
<duration>1</duration> - beam time
<duration_prepare>0.1</duration_prepare> - preparation animation time
<duration_complete>0.1</duration_complete> - finishing animation time
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 11, 2014, 06:36:23 AM
Right, the weapon duration I got.  The issue I'm running into is with the actual projectile animation. :)  Inside the code it's written as:

<sprite>
   <width>2</width>
   <height>2</height>
   <textures>
      <diffuse>projectiles/flamethrower_3.png</diffuse>
   </textures>
   <animation>
      <rows>1</rows>
      <columns>10</columns>
      <delay>150</delay>
   </animation>
</sprite>

Height and width I get, they apply to the scaling of the sprite.  Texture is obvious.  Rows/cols pertains to the organization of frames inside the texture file.  The one I'm not sure on is delay.  I figured if it was in milliseconds the above example should display seamlessly with a shot lasting exactly 1.5 seconds (10 frames x 150 ms per frame = 1500ms or 1.5s).  Unless... is it possible that the time is in milliseconds but only applied between frames, so the above example would only be running 150ms x 9 spaces between frames?  Dis is the part I don't know. :)
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on December 12, 2014, 02:56:59 AM
Hello! I will investigate it and respond later.
Regards!
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 13, 2014, 07:12:41 AM
No big rush, ai; more just a curiosity than anything. ;)

So far as I know all the projectiles in vanilla have cyclic sprites anyway, so it doesn't matter which frame the animation starts on; it only shows if you use a sprite that has an end state different from the starting state.
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 13, 2014, 11:04:03 PM
Oh, also had a secondary question, but this is a /really/ low-priority one just in case anyone knows the answer and I can't recall if I brought it up and got an answer, heh:

How does the DPS calculator in the item tooltip handle scattering projectiles?  I'm curious because it seems to be almost double-reporting any projectiles tagged as scattering. :)  Example:

CRB-F1 Anubis Light Fighter Bay
Launches 1 fighter per second (ROF 1.0)
Each fighter, once launched, takes a second to acquire their target
Starting at 2 seconds the fighter begins firing a shot every 0.25 seconds for 10 damage each.  24 shots are fired in total over 6 seconds for a maximum damage of 10 x 24 or 240 damage per fighter.

So at 240 damage per fighter and 1 fighter per second, the DPS should report at 240... but the game reports it as 480 DPS.  In action the fighter seems to be performing correctly at 10 damage per shot and four shots per second (about 40 DPS for six seconds straight), so it's still working correctly where it counts; was just wondering why the game inflated the number. :)
Title: Re: Modding the VoidExpanse
Post by: Lurler on December 17, 2014, 02:39:34 AM
In regards to DPS calculation - it simply adds up all damage values giving you the final raw number. It doesn't do any special calculations :)
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on December 17, 2014, 03:36:35 AM
Hammish, thanks for reporting about the sprites issue. The sprites system was completely rewritten (already available in the today release v0.15.0) to fix all issues and inconsistency with it.
The changelist:
1. animation delay in seconds;
2. total animation duration calculated as Rows * Columns * Delay. So if you have 2 rows, 5 colums and 0.1s delay, duration will be exactly one second;
3. animation always starting with the first frame of sequence;
4. sprites rendered same as it looks in the image file (previously it was flipped horizontally);
5. sprites rotated taking into account rotation of the weapon turret (the frames in a source image file should be rotated to "look" upwards, not to the right);
6. performance improved (added pool of sprites);
7. muzzle flashes was also improved as they're using sprites system (but still have issue with orientation - they should be oriented to the right, will fix it at the next release).
Regards!
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 17, 2014, 08:23:55 AM
Awesome!  I'll have to pour through and rotate sprites as needed, but the system you're describing in the new version sounds way more intuitive.  I always had to do some odd rotation and checking when I worked on sprites previously. :)

What changed with regards to muzzle flash, BTW?  They were something I was actually thinking about asking about, truthfully, since I noticed a few things like how odd they look if you try to add them to a beam weapon (kinda flicker on and off, I had almost expected them to stay steady-on).  I was also curious as to if, down the road, it might be possible to add in optional positional data from the muzzle flash; I've been making do and just kinda juryrigging the system thus far for stuff like the dual turret in BTC, but I'm finding with the way the engine scales sprites it's impossible to get the flash to look right on any turret type that is a different scale from the default ones.  By optional, I just mean if there is no data in there then it just defaults to the current offset, but if you say have a larger weapon you have the option to offset the muzzle flash along X/Y by whatever amount.
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on December 17, 2014, 09:14:01 AM
Hammish, you're right about the muzzle flashes, the current implementation is unfinished. We will improve them and also add muzzle flashes for the ray weapons (with smooth fade-in fade-out according to the opacity of the ray).
>> By optional, I just mean if there is no data in there then it just defaults to the current offset, but if you say have a larger weapon you have the option to offset the muzzle flash along X/Y by whatever amount.
Hm... we can add something like "projectile_spawn_offset" for the "weapon_slot" definition in hull XML - it will be used as the starting point for rays and spawned projectiles (currently they're spawning from the center of the turret), and also it seems good to use this point as the root point for the muzzle flash. Or maybe you have a better idea?
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 17, 2014, 09:46:11 AM
At first I thought that sounded like a great idea, then I thought of something: is it at all possible to have the projectile_spawn_offset value set on the weapon instead of the hull?  I ask because one of the things I've done is started producing differing sizes of turrets for hardpoints; large guns (III) actually have a larger model than small guns (I) and the like.  Given that, it might produce some weird effects if you put a small turret on a large hardpoint, or if you had a situation where say a beam weapon had a different turret model from an energy cannon and thus you might want a different origin point.

Of course, I have no idea how much more difficult it'd be to set it based on the weapon .XML versus the hull .XML.  If the data structure doesn't allow it, at least setting it exactly as you mentioned would be an excellent improvement; modders would just have to make sure that every turret that can fit the hardpoint has the same scale so that the shared spawning point looks okay.
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 17, 2014, 09:58:55 AM
Oh, and about the DPS bit I mentioned above, here are the examples I was mentioning, here are the weapon and tooltip examples:

(http://i.imgur.com/sSF9d4b.jpg)

https://www.dropbox.com/s/wiqhrcb5jldg4bb/weapon_crb_f1.xml?dl=0

If you don't feel like pouring over the .XML (which I understand, hah), there are actually 25 projectiles in it: the base fighter launch and 24 gunshots at 0.25s intervals, each for 10 damage.  The base projectile that does the scattering is 0 damage, so the total damage per shot should only 0 + (10 x 24) or 240, not 480.  The actual DPS calculation seems to be correct, though, because the bay will launch one fighter per second.  Just seems like when it's figuring out the total damage per projectile it's counting the scattering shots twice or at double their value, is all.
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on December 19, 2014, 12:21:04 AM
Hammish, thanks for clarification about the issue with DPS.
I've fixed it. It was a small mistake in the code. Now the issue seems to be fixed.
Regards!
Title: Re: Modding the VoidExpanse
Post by: Hammish on December 20, 2014, 12:40:33 AM
Awesome!  I'm actually starting to feel like a productive tester even as I feel badly for bringing things up. ;)
Title: Re: Modding the VoidExpanse
Post by: zeeHtaa on April 04, 2015, 02:04:55 AM
Thanks for this thread, it contains ALOT of very helpful info,
unfortunatly i still have questions which are unanswered  :-[


...and thanks again to the Dev's for answering the questions in this thread and making this great game, i really enjoy the moddability of it :D
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on April 04, 2015, 04:05:46 AM
Quote from: zeeHtaa on April 04, 2015, 02:04:55 AM
projectile_type
Depending on the projectile_type value, the parser expects specific XML description of the projectile: 1=instant hit, 2=ray, 3=physical projectile (the physical object will be created for this type with a 3D model or sprite visual appearance).

Quote from: zeeHtaa on April 04, 2015, 02:04:55 AM
Engine Trail color
For the player, engine trail is set by engine, not by hull. For NPCs you can see trails of color set in their hulls.

Quote from: zeeHtaa on April 04, 2015, 02:04:55 AM
(Ship) Model Textures
Is it possible to use models that have more then 1 texture associated with them, as i see the syntax at the moment i assume it's not ?
You can assign only one diffuse, one normalmap, one illumination and one specular texture per model. That's how the shaders works.

Quote from: zeeHtaa on April 04, 2015, 02:04:55 AM
...and thanks again to the Dev's for answering the questions in this thread and making this great game, i really enjoy the moddability of it :D
Thanks! Will see your mods!

Regards!
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 06, 2015, 03:22:50 PM
This actually reminded me  of another quickie, old question. :D

As opposed to projectile_type, what does dmg_type affect?  I know it affects (or seems to affect) if a shot can produce an AOE explosion at shot death or not (like a missile does) but does it also determine things like which damage multiplier affects it, or is that based on the turret type alone?

IE, if I take a missile launcher but instead of dmg_type 3, make them all dmg_type 1 (kinetic missiles or something) will Increased Missile Damage still affect them, or would they now use Ballistic or Energy mods?
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 17, 2015, 05:58:00 AM
Question of the day is back, for when the devs have time. ;)

This one I'm hoping is a quickie.  Is the armor on spawned mobs (like pirates) static and based on the hull you give the pirate, or does it increase based on level/danger level of the system?  If it does increase, which JS or XML handles that?
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on April 17, 2015, 07:38:52 AM
Hammish, sorry for a late reply,
"dmg_type" - I'm not sure and sources is not nearby, so I will answer on Monday :-). But I'm sure that 1 and 2 is gives pretty the same result, but 3 creates explosions and apply damage on area.

About the spawned NPCs - they doesn't use effects from the hull XML, effects for them are defined in the corresponding NPC XML files.
The idea with NPCs-mobs is that their basic values (such as structure, shield, etc) are defined in CalculateShip.js script and these values are multiplied on the system danger level with some coefficient. You can increase these values by defining percent-increase effects in the NPC XML files (as we did for the aliens mobs and pirates).

Regards!
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 17, 2015, 09:06:10 AM
Okay!  Like always, no rush. :)

As to the aliens, okay, I see the calculation now.  So a few follow-up question, then: can you use the NPC XML files to change up non-percentile effects as well?  For instance, armor, if I used just <effect_type>armor</effect_type>, instead of <effect_type>armor_percent</effect_type>, could I add a flat amount?

Essentially, what I'm looking to do here is set default armor values for each size class in my mod.  So if the above would work and I can add a flat amount, that's easy enough; I can just modify CalculateShip.js to give zero armor for any system danger level, and instead grant the ship the armor it should have for the hull type directly in each pirate XML. :)

Also, what does the <hull> tag do in the pirate XMLs, then?  Is it just used for the visuals, knowing which model to use and where the turret hardpoints attach, ect?
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 20, 2015, 03:30:24 AM
I suppose I can do a better job of framing the questions, as well.

Basically, it would be in three parts.

A) Can I use non-percent values in NPC stat XMLs;
B) The stats applied in the NPC XMLs, are they applied after CalculateNpcLeveledCache?  I ask because I can't find the section of the script where it's reading the set effect variables off the pirate XML; it seems to just write them directly to a given mob.

Basically I'm hoping I can achieve what I want with two changes:
1) Set something like in CalculateShip.js, to make the variable-based-on-danger armor zero:

IMCache.AddValue("armor_value", 0 + lerp * 0)

2) Set something like this in the NPC XML:

         <effect>
            <effect_type>armor_value</effect_type>
            <effect_base>20</effect_base>
         </effect>


So, is that possible/should it work, or is my syntax off? :)
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 20, 2015, 01:44:16 PM
Nevermind, don't need an answer.  Got bored this weekend and the simple answer is yes, you can use flat values just fine. :D

Got the new system working well, it'd seem.  Soon BTC will have the equivalent of 7.62mm rounds bouncing right off tank armor!
Title: Re: Modding the VoidExpanse
Post by: Lurler on April 20, 2015, 09:59:35 PM
Yup, this is correct. You can use "base" values as well. Basically anywhere where this is supported.

As for bouncing rounds - if only they actually bounced :)
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 22, 2015, 07:24:57 AM
That would indeed look awesome, seeing like a small round ricochet off thick armor without spalling. ;)
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 23, 2015, 10:45:09 PM
One last quick question for now.  If I'm reading CalculateShip.js correctly, all modifiers from all ships are added together into the cache before being applied, right?

Example:

I have a ship that is mounting a 1000-strength shield.
I have skills that give me +100% strength.
I place a mod on the hull that also gives the effect of +100% strength.

Would the total strength be 3000 or 4000?  I know for boosts in the same category it adds them together (so if I had a skill for 50% and a skill for 50%, it'd give 100% off the base), but I'm not entirely sure how it works if the modifiers are coming from different areas (skillcache vs. invcache vs. buffscache).

Thanks in advance for any answers, guys.  Still doing what I can to try and get word out about the game, hope your sales are going steadily and you're getting some reward for your time spent both on the code and on people like me who like math and systems. :)
Title: Re: Modding the VoidExpanse
Post by: Lurler on April 23, 2015, 11:35:06 PM
The way all bonuses add up together is somewhat complicated, but the basic idea is that all numeric values are added first and THEN all bonus (%) values are added on top of that. So, it would be 3000 in this case.
Title: Re: Modding the VoidExpanse
Post by: Hammish on April 24, 2015, 06:00:55 AM
Yar, I knew from analyzing the javascript that flat values were added in first, calculated, and then percentiles added in.  Also clarified this (and I forgot I had) when I added in my new defensive tech tree; it has both flat bonuses (good for lighter ships) and percentile bonuses (great for larger ships), and you can tell from the final number how it handles those.

I just wasn't sure how it'd parse it if you had two percentile values from different sources (it seems like the game treats effects from gear, skills and buffs all differently in the calc.) :)
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 20, 2015, 09:04:58 AM
So, time to start some questions for 1.4 with the changes. :)

Big one coming to mind is this: are the overreaching skill categories hardcoded into the UI or are there XML files for it?  I was never able to find the data for them but it would be a nice aspect to be able to change via modding.  I've obviously been able to revamp the skills themselves but never the headers/categories.
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on June 21, 2015, 04:31:14 AM
Hammish, yes, there are not yet available for modding as they're hardcoded in the common client-server code. We could improve it in the future versions.
Title: Re: Modding the VoidExpanse
Post by: Hammish on June 22, 2015, 11:11:39 PM
If you ever do, let me know.  I'd hope it'd be a small change if it were, really, just changing the hardcode in that portion of the GUI to point to an XML or TXT instead. :)
Title: Re: Modding the VoidExpanse
Post by: ComVlad on June 26, 2015, 08:58:31 AM
I'm sorry if this question has already been answered but how do you add an npc to stations? I've been digging through the files but I just cant seem to find which one determines what npc are available on which station.
Title: Re: Modding the VoidExpanse
Post by: ai_enabled on June 26, 2015, 11:23:12 PM
ComVlad, you need to spawn the NPC and then dock him to station. For example:

var ship_id = generator.AddNPCShipToSystem("Npc name goes here", "BaseSitter", 5, "special_human_techship", system_id, 1000, 1000, { class: "order.scientist", unique_id: "scientist.unique_id_goes_here", meta: "human", sex: "male", outfit: "science" });
relations.SetShipFaction(ship_id, "order");
generator.DockShipToBase(ship_id, station_id);

Please note you need to provide the system_id, station_id and fill the name and unique_id (if you need it).
"Dock" means immediately teleporting ship to the station.