• Welcome to AtomicTorch Studio Forums.
 

Modding the VoidExpanse

Started by MrVoff, November 20, 2013, 01:05:21 AM

Hammish

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.

Hammish

#61
Oh, and about the DPS bit I mentioned above, here are the examples I was mentioning, here are the weapon and tooltip examples:



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.

ai_enabled

#62
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!

Hammish

Awesome!  I'm actually starting to feel like a productive tester even as I feel badly for bringing things up. ;)

zeeHtaa

Thanks for this thread, it contains ALOT of very helpful info,
unfortunatly i still have questions which are unanswered  :-[


  • projectile_type
    In weapon files, what's the exact meaning of projectile_type ?
    I assume the different numbers refer to if they are "visualized" by use of a model, sprite or ray - some verification/explanation on that would be lovely.
  • Engine Trail color
    I tried changeing the engine trail color on a ship i added, by modifying the <default_color> value in the ship file, to no effect however. I stayed in a blueish color. I even tried added new custom trail definition files with a changed color - no effect either ...did i stumble on a bug, or is it a feature  :o
  • (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 ?

...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

ai_enabled

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!

Hammish

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?

Hammish

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?

ai_enabled

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!

Hammish

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?

Hammish

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? :)

Hammish

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!

Lurler

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 :)

Hammish

That would indeed look awesome, seeing like a small round ricochet off thick armor without spalling. ;)

Hammish

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. :)