• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
I'm a-fiddlin'. A lot.

On the topic of .asset files, I have managed to open a few of them in a hex editor, which gave me file types of Unity FS. Also, rummaged a bit inside them and saw that AC weapon effect is mentioned as just a "bullet", a trait which is unique to ACs, and looks like its just a VFX thing, without any actual structure. However, UABE won't let me see the projectile type for the MG - don't know why. I'd say that specific entry gives the MG multifire in the current game engine environment.

And now to SSRMs;
Managed to decompile Assembly-CSharp.dll, and found detailed instructions how to create a weapon effect in the folder tree (in the .dll's Battletech folder, files which have "Effect" in the name). My guess is you would have to create something like a small laser with a "tag" effect, and then tie that effect into the SSRM launcher fire bool true/false value. Or more specifically, create a support weapon OR a piece of kit without any prefabs, as long as it's shown in the weapon list, which when fired/used creates an effect on your 'Mech, and then create a SSRM system which fires only when you have the mentioned "tag" effect on you (ie. Weapon Lock Enabled). Also, as far as I know, you can add multiple effects on a piece of gear, so would it be a good idea to include a Sensor Lock into the entire "if clause" shenanigan? If nothing else, for SLRMs maybe? Somehow. This is just a step up from random brainstorm/fart. (I am literally typing this with one eye open, the second one is being kept open by the second can of famous M energy drink. :confused::confused: ) Seeing your forum signature, I'd say you have more of an inkling what to do and how to do it.

I'm uploading all decompiled files from the Assembly-CSharp.dll with this post, there are some interesting things inside, so whoever wants to dig in, be my guest. (I hope its allowed by forum rules) I used MS Visual Studio 2017 to open them, and Notepad++ works as well. Have fun folks. :)
 

Attachments

  • Decompiled Assembly-Sharp.7z
    4,7 MB · Views: 24
Warning to modding salvage:
On the Mission Report screen, "Claimed Salvage" has a 7 item limit.

I managed to go over this for the first time with "PrioritySalvageModifier" : 0.4, and hitting a 22 max item contract.
 
I know I've seen it multiple times here... what's the mod to get all the + gear and special gear available in SP Skirmish?
 
I think someone asked this before, but I am having trouble finding it.

Is there a way to resize a single 'Mech or Vehicle (rather than the entire lot of them)?
 
Next thing I'm adding to my idea/research list:

A megastore.

As in, I've played through the campaign rolling with RNG-driven mechs and salvage and weapons and gear. Twice. I've done "this is your life, Mercenary" enough. I'd like to try out specific mechs and specific builds in the context of the campaign.

Therefore, it is my intent to turn one of the neutral planets close to the Restoration into a sort of periphery black market superstore.

This avoids all the rigamarole of getting the items into random spawns in various stores, messing with salvage, messing with rarity, trying to get new mechs/variants "inserted" into an ongoing campaign, etc


My one concern starting out is that the store UI might have a limited number of items it can cope with, and a full selection of mechs and gear might blow way past that limit.
 
There is already
Next thing I'm adding to my idea/research list:

A megastore.

Allow me to help :)

Go to the data/shops folder.

Make a copy of shopdef_Mech_all.json

Open it and remove the 'debug; from items

Then add the tag(s) you want (which could include the name of the planet tag to place it in a specific location)

You say you want weapons? Do the same with shopdef_Weapons_all.json

But wait.... you want Upgrades?


Then you're SOL ;) They didn't include one for all of them :p But you could copy and edit the Star League one to cut down on the time.


Bonus Round :
You say - I am using that totally awesome JK Variants mod (boy, isn't it swell!), but golly gee willikers, what if I want to play aroung with those 'Mechs or Weapons?

Well, by George. we got you covered - with:
shopdef_JK_Mech_all.json
shopdef_JK_Weapons_all.json

;)
 
Last edited:
Evidently I messed something up, because now there are NO mechs for sale at Kimi, rather than whatever might be there.

Does the "chassis template" entry at the top of the mech list need to come off?

Does each mech entry need a "count" of a value other than 0?
 
Don't forget that there is the chance of 0 mechs for sale anyway. Its not necessarily an error with a mod.

I'm playing with an un-modded market and at one point I had 3 planets in a row with ZERO mech parts to buy.
 
Ah. My idea was that it would be a literal megamarket, with all the mechs all the time, all the weapons all the time, all the etc all the time.

(I've done campaigns of scrounging, now I'd like to just try some things in the context of the campaign.)
 
The "all" file should have everything appear at whatever planet - as they are in Inventory.

Try removing the ChassisTemplate lines and confirm that the "debug" line is replace by "planet_name_xxxxxxxx" with xxxxxxxx being the planet name "exactly" as it appears in the tag within that planet's json.

Which planet are you trying to do it on?
 
I'm a-fiddlin'. A lot.

On the topic of .asset files, I have managed to open a few of them in a hex editor, which gave me file types of Unity FS. Also, rummaged a bit inside them and saw that AC weapon effect is mentioned as just a "bullet", a trait which is unique to ACs, and looks like its just a VFX thing, without any actual structure. However, UABE won't let me see the projectile type for the MG - don't know why. I'd say that specific entry gives the MG multifire in the current game engine environment.

And now to SSRMs;
Managed to decompile Assembly-CSharp.dll, and found detailed instructions how to create a weapon effect in the folder tree (in the .dll's Battletech folder, files which have "Effect" in the name). My guess is you would have to create something like a small laser with a "tag" effect, and then tie that effect into the SSRM launcher fire bool true/false value. Or more specifically, create a support weapon OR a piece of kit without any prefabs, as long as it's shown in the weapon list, which when fired/used creates an effect on your 'Mech, and then create a SSRM system which fires only when you have the mentioned "tag" effect on you (ie. Weapon Lock Enabled). Also, as far as I know, you can add multiple effects on a piece of gear, so would it be a good idea to include a Sensor Lock into the entire "if clause" shenanigan? If nothing else, for SLRMs maybe? Somehow. This is just a step up from random brainstorm/fart. (I am literally typing this with one eye open, the second one is being kept open by the second can of famous M energy drink. :confused::confused: ) Seeing your forum signature, I'd say you have more of an inkling what to do and how to do it.

I'm uploading all decompiled files from the Assembly-CSharp.dll with this post, there are some interesting things inside, so whoever wants to dig in, be my guest. (I hope its allowed by forum rules) I used MS Visual Studio 2017 to open them, and Notepad++ works as well. Have fun folks. :)

That is pretty neat - I'll have to look at this later and check it out.

But, are you saying that it already has the 'effect' types embedded in it, so we can add them to the files? Or we would have to add in those effects?
 
The "all" file should have everything appear at whatever planet - as they are in Inventory.

Try removing the ChassisTemplate lines and confirm that the "debug" line is replace by "planet_name_xxxxxxxx" with xxxxxxxx being the planet name "exactly" as it appears in the tag within that planet's json.

Which planet are you trying to do it on?

Figured I'd try Kimi first, it's close. I did keep a backup of the Kimi file if I change my mind.

I went into the system json and copied the line for the planet name over to replace the "debug" in the new mech shop json, exactly has it is for the planet-specific shops inside the Restoration (though obviously not using the "flipped" part, just the Kimi planet reference exactly in the Kimi system json).
 
Greetings and salutations 'ModWarriors.

But, are you saying that it already has the 'effect' types embedded in it, so we can add them to the files? Or we would have to add in those effects?

There in lies the problem for me. The effects themselves are not VersionManifest dependant, it's something worse (for me). There is a ton of special effect related files within Assembly-Sharp.dll, and if I got everything right, only definitions which have ties to CombatConstants.json (or COMBAT_CONSTANT_FILE as mentioned in the .dll) can be used as references in the "Statuseffect" field in the item .json. While the item itself is loaded in the game by the instructions from VersionManifest, there is a entire convoluted system in the background that checks for status effects and similar, non-VersionManifest fields. It has to be tied in to select definitions within the game data library, in a way that the game data system recognises it and pushes it through its pipes to make it actually load in the data matrix and then be applied in the game, not the graphical system or just moving predefined settings around like I did so far. AND it has to be written in the .json (no need to write it anywhere else, as opposed to adding a weapon or 'Mech) in C#, which means that some effect definitions are way different than what we see in game, AND in a way that the game .dlls understand so it can be implemented. The problem is, I use C# and its logic expressions as good as Hodor uses the English language. I do think that's the apt comparison.

Example, the PPC weapon effect. I didn't find that "AbilityDefId" anywhere, and I checked the StreamingAssets, .asset files and .dll files to the extent I could. So it's a thing of writing in a way game understands(C# expression/field), about a thing game understands (only combatconstants and parent/child files apply, to some extent as I gather). So the equivalent of shouting "HODOR HODOR HODOR" in the game data structure hoping it does something won't work, and I don't think I can do something more, for now. And that's as far as my programming knowledge goes.

But I'm trying to make something, anything that works, so hopefully I'll get the logic behind that eventually. By Battletech III, certainly.

If anyone wants I can type in an example, just mention it in the reply.

P.S. I have no programming education whatsoever, everything I know is self taught, so there are some glaring errors in what I wrote. To anyone who can actually use the programming language, my apologies for making your eyes bleed, but please, feel free to quip in and explain where I went wrong.


Evidently I messed something up, because now there are NO mechs for sale at Kimi, rather than whatever might be there.

Does the "chassis template" entry at the top of the mech list need to come off?

Does each mech entry need a "count" of a value other than 0?

Hehehe, something I actually understand how it works. :D:D
(I'll assume you backed everything up in seven different locations, because reasons)
First, shop inventories in the SimGameConstants.json file, increase the inventory limit and special inventory limit (I do not know if there is a max number of items that the game engine can display, my settings are 120 and 50 for the special inventory but I haven't edited the starsytem.jsons shop inventory). Then go in the Starsytem folder and add the "debug" tag to the system of your choosing. If you are adding a brand, spanking new shop.json, you have to enter it in the VersionManifest to be loaded in.
Or just copy this over from bracket to bracket.
},
"Tags": {
"items": [
"debug"
],
"tagSetSourceFile": ""
},

Make sure there are no other tags active on the system you want. Could create a conflict in the Data.Manager, the dreaded Circle of Doom. Also, edit the shop info in the system.json if you want to increase the inventory size there as well.
ie.:
"FuelingStation": true,
"JumpDistance": 8,
"Owner": "TaurianConcordat",
"ShopRefreshRate": 0, --> 1
"ShopMaxInventory": 0--> 70
"ShopMaxSpecials": 9, --> 50

That should enable the debug shop inventory.
Finally, go through all of the mechdefs and make sure they have rarity set to 0. And that they are not blacklisted (explained few rows down).
In the shop.json you're currently editing, change part of the the definitions from "mechpart" to "mech" (if it isn't already so), and that the last part of the def in the shop.json is "Count" : 0,
not "Weight:xy", that moves it to the special inventory, me reckons.
Shop entries should look something like this:

{
"ID" : "mechdef_atlas_AS7-D-HT",
"Type" : "Mech",
"DiscountModifier" : 1.0,
"Count" : 0
},
This entry is usable right away, just copy it into the shop folder you want. But this one is blacklisted in the tags, which means:

The "mechdef" tags are for Lance spawner, it denotes what type of 'Mech/chassis it is so the game can add it to the combat roster as stated by the requirements of the contract/mission, they have nothing to do with the shop availability. Except for one. "BLACKLISTED" tag, applicable for anything in the game means that thing wont show up normally, it has to be manually added to the mission/shop/player inventory to make it appear, but otherwise its a perfectly valid game item. StarLeague era 'Mechs, for example. If you want to use it, open the mechdef and delete the tag, but make sure you delete the comma behind it.
Ie.:
"MechTags": {
"items": [
"unit_indirectFire",
"unit_mech",
"unit_assault",
"unit_ready",
"unit_lance_tank",
"unit_role_brawler",
"BLACKLISTED"
],

to

"MechTags": {
"items": [
"unit_indirectFire",
"unit_mech",
"unit_assault",
"unit_ready",
"unit_lance_tank",
"unit_role_brawler"
],

Also you can add the tag to whatever you wan't, just make sure its in inverted commas, and in caps. The game sees differences on lower/upper case in its data library.
Also, @Max_Killjoy if you knew all of this beforehand, apologies for the wall of text, but just wanted to state every step i could think of at the moment.

Cheers peepz,
Sigmar
 
OK -- so I can add a "link" to the "debug shop" to an existing system, but if I create a new system or "tag" shop, I need to also make a change in the manifest file? Interesting.
 
Yes. You can attach tags without going into the Manifest file, but any new object that has to be loaded from any kind of database, .asset or .json has to be added. And adding new tags is done in MetadataDatabase.db file, which is a .sql database. So if you do want to add tags, have fun. :)
 
Hey folks, I'm putting together a modpack, and there's two things I would REALLY like to do that I haven't achieved yet:

Has any one been able to create a new "AmmoCategory" yet? Whenever I try It breaks the game, am hoping there's some magic I can do to change this. Would spice up some weapons being added in.

Is it possible to add new tags, such as for example "Unit_Lance_Clan" to delineate that this unit should be spawned in clan lances. Then making new Lance defs to incorporate that, and eventually a new contract that spawns clan lances.

to clarify -> Is it possible in any way to create a *new* AmmoCategory. And is it possible to create *new* tags for use in dynamic lance spawning.

-Edit- just read the comment above, I guess that answers my tag question... possibly also the AmmoCategory one at the same time ?
 
Alternatively - instead of adding debug to the starsystem - you can add the specific starsystem tag into the Shop file.

"planet_name_kimi"

Hey folks, I'm putting together a modpack, and there's two things I would REALLY like to do that I haven't achieved yet:

Has any one been able to create a new "AmmoCategory" yet? Whenever I try It breaks the game, am hoping there's some magic I can do to change this. Would spice up some weapons being added in.

Is it possible to add new tags, such as for example "Unit_Lance_Clan" to delineate that this unit should be spawned in clan lances. Then making new Lance defs to incorporate that, and eventually a new contract that spawns clan lances.

to clarify -> Is it possible in any way to create a *new* AmmoCategory. And is it possible to create *new* tags for use in dynamic lance spawning.

-Edit- just read the comment above, I guess that answers my tag question... possibly also the AmmoCategory one at the same time ?

There is a thread on ammo that came up this week : https://forum.paradoxplaza.com/foru...lp-creating-completely-new-ammo-type.1104795/

Long story short - you need to edit the MetadataDatabase.db as well as creating the jsons.

For the 'Clan' lance, it isn't so much creating the name of the file or unit - what defines which 'Mechs are chosen are the parameters in that JSON. Your best bet would be to create a new unit tag called "unit_clan". You then add that tag into any Clan 'Mech definitions AND you make that a requirement for the Lance defs.
 
New question for the peanut gallery.

Has anyone tried to add harpoints / attack values to buildings?

For example - curious if we can mount a SRM-2 Launcher (or MG) in the 'Barracks' style building? This could be used in scenarios to represent the troops inside a building firing shoulder rockets or mounted MGs at adversaries - which could then be expanded upon to have fortification style defenses available.

Alternatively, wondering if we can use the art from a building to create a new Turret type.