VoidExpanse > Modding info

WIP Salvaging

(1/3) > >>

Hi guys,

Fairly new to modding and i'm trying to learn/do some basic stuff. I'm considering giving some extractable ressources to debris floating in space. Before granting them differents ressources and quantity, i'm focusing on giving the asteroid miner (the civilian one) the possibility to "mine" debris. So i modified all the xml file of debris (debris barrel, solar panel etc) in the following way :


      <!-- none-->


      <difficulty>1000</difficulty> <!-- how long will it take to mine asteroid -->


and changed the harvester by the following :
      <title>Civilian mining device</title>
      <description>The most basic mining device. It works... but not as well as you would like. The good thing about it is that you don't need any qualifications to use it, unlike other mining devices.</description>



         <!-- none -->

         <!-- none -->

         <!-- none -->


         <durability>25000</durability> <!-- max durability -->

         <cooldown>1</cooldown> <!-- cooldown in seconds after initiation of usage -->

            determines a way the module can be activated
         <target>3</target> <!-- 0- N/A, 1- self, 2- area (around self), 3- object, 4- coordinates -->
            <range>10</range> <!-- used for all except "self" and "area" mode. -->
            <!-- determines area of effect on specified coordinates. only for "area", "target", "coordinates" -->
            <!-- only for "target" mode. For target can be specified: asteroid, ship, crate, jumpgate, base -->

         <!-- DEVICE ACTION
            determines how module effect should be applied
         <action_type>2</action_type> <!-- 0- N/A, 1- immediate, 2- per frame, 3- on complete -->
         <!-- the following configuration is only applicable for "per frame" and "on complete" modes -->
            <duration>0</duration> <!-- 0 for infinite -->
            <cancel_on_move>1</cancel_on_move> <!-- module is disabled when ship moves -->
            <cancel_on_take_damage>1</cancel_on_take_damage> <!-- module is disabled when ship takes damage -->
            <cancel_on_deactivate>0</cancel_on_deactivate> <!-- module is disabled when user activates it again (in this case deactivates) -->

            can be any number parameters, also accessible through scripts

         <!-- script definition for this module, must be valid filename -->


When trying to do so in game, i have the following notification on the top left of the screen : http://images.akamai.steamusercontent.com/ugc/610604005651531581/BC3397265173812EEA79F007B85B1A55F8C0DA8F/

So any idea what can i do to fix this ? Thanks in advance !

Hm, my understanding is that you need to mark the debris with the same tag you are using in the device. Specifically "debris".
Though, to be honest I am not even sure that's possible. But probably yes. I do not see the same tag on asteroids though, so maybe this behavior is hardcoded...

Thanks for responding and yes. I cant see a tag on asteroids too... and i dunno if simply add a tag will do the trick. Maybe adding "mineable" on debris... maybe... will try this evening and post the result here.

The mining is not hardcoded at the game core code, it's implemented with Mining devices at mining device script "data\scripts\devices\ModuleMining.js" it calls GetAsteroidDescriptionByID() so it expect to work only with asteroids.

I think it's possible to introduce special mining device to "mine" debris, but then you need to make another device script for it.

I just checked and there are no special tag for debris, they are known by the game core as "spaceobject" tag.
So if you want your device to act on debris, you need to use "spaceobject" filter, not "debris".
You cannot introduce new tags :-(. It's hardcoded.


[0] Message Index

[#] Next page

Go to full version