Okay, so I'm trying to make a separate mod that adds an extra power armor mk4 to Rampant Arsenal, which is supposed to require the power armor MK3 from Rampant Arsenal.
However, even with Rampant Arsenal as a required dependency, the game keeps throwing up the error "power-armor-mk3" (which is the exact name of the power armor mk3 technology Rampant has in its Technologies.lua) does not exist.
What am I doing wrong? Any ideas?
Heres the mod below if anyone wants to take a look and try it with Rampant Arsenal.
Using another mods technology as a prerequisite
-
- Burner Inserter
- Posts: 11
- Joined: Sun Nov 27, 2016 12:25 pm
- Contact:
Using another mods technology as a prerequisite
- Attachments
-
- Rampant Armor MK4_0.0.1.zip
- (33.07 KiB) Downloaded 74 times
Last edited by Shapeshifters on Tue Apr 28, 2020 3:44 am, edited 1 time in total.
-
- Burner Inserter
- Posts: 11
- Joined: Sun Nov 27, 2016 12:25 pm
- Contact:
Re: Using another mods technology as a prerequisite
So from what I'm getting is I needed to add a require function to my data.lua for Rampant Arsenals lua files that define "power-armor-mk3". So I did this, I thought for sure that would work, and I'm still getting the same error in AssignID for some reason.. huh.
Re: Using another mods technology as a prerequisite
Rename it into the data-updates.luaShapeshifters wrote: Tue Apr 28, 2020 3:43 am So from what I'm getting is I needed to add a require function to my data.lua for Rampant Arsenals lua files that define "power-armor-mk3". So I did this, I thought for sure that would work, and I'm still getting the same error in AssignID for some reason.. huh.
Re: Using another mods technology as a prerequisite
Hi,
i'm the first one who downloaded your attached file at all tolook really into it.
------------------------------------------------------------------------------------------------------------------------------
First i recognized is, you didn't named the folder right.
It has to have the same name like in the info.json, followed by an underscore and the version number.
info.json -> name: Rampant Armor MK4
zip name: Rampant Armor MK4_0.0.1
folder name: RampantArmorMK4_0.0.1 -> correct: Rampant Armor MK4_0.0.1
------------------------------------------------------------------------------------------------------------------------------
You don't need to require any file from other mods, requiring your own files can all happen in data.lua as you have set the correct dependency to RampantArsenal.
------------------------------------------------------------------------------------------------------------------------------
Now the real magic is the technology name. As you correctly found out the name in Technologies.lua. You overlooked the function in TechnologiesUtils. This function adds "rampant-arsenal-technology-" before the given name.
------------------------------------------------------------------------------------------------------------------------------
Currently i have a path error with your mod which i have to look into. Hopefully it's not because the spaces in your mod name.
I suppose you copied some code and forgot to change the image references.
prototypes\item\power-armor-mk4.lua - change
to
prototypes\technology\power-armor-mk4.lua - change
to
------------------------------------------------------------------------------------------------------------------------------
Not sure what your migration .json is for, do you like to share your intention?
------------------------------------------------------------------------------------------------------------------------------
Hint: For compatibility you could add "adv-generator" to equipment_categories in prototypes\equipment\equipment-grid2.lua
This allows to put the Nuclear Generator into the armor.
------------------------------------------------------------------------------------------------------------------------------
Tldr: Correct technology name is rampant-arsenal-technology-power-armor-mk3 instead of power-armor-mk3
Cu, steinio.
i'm the first one who downloaded your attached file at all tolook really into it.
------------------------------------------------------------------------------------------------------------------------------
First i recognized is, you didn't named the folder right.
It has to have the same name like in the info.json, followed by an underscore and the version number.
info.json -> name: Rampant Armor MK4
zip name: Rampant Armor MK4_0.0.1
folder name: RampantArmorMK4_0.0.1 -> correct: Rampant Armor MK4_0.0.1
------------------------------------------------------------------------------------------------------------------------------
You don't need to require any file from other mods, requiring your own files can all happen in data.lua as you have set the correct dependency to RampantArsenal.
------------------------------------------------------------------------------------------------------------------------------
Now the real magic is the technology name. As you correctly found out the name in Technologies.lua. You overlooked the function in TechnologiesUtils. This function adds "rampant-arsenal-technology-" before the given name.
------------------------------------------------------------------------------------------------------------------------------
I suppose you copied some code and forgot to change the image references.
prototypes\item\power-armor-mk4.lua - change
Code: Select all
icon = "__Power Armor MK4__/graphics/icons/power-armor-mk4.png",
Code: Select all
icon = "__Rampant Armor MK4__/graphics/icons/power-armor-mk4.png",
Code: Select all
icon = "__Power Armor MK4__/graphics/technology/power-armor-mk4.png",
Code: Select all
icon = "__Rampant Armor MK4__/graphics/technology/power-armor-mk4.png",
Not sure what your migration .json is for, do you like to share your intention?
------------------------------------------------------------------------------------------------------------------------------
Hint: For compatibility you could add "adv-generator" to equipment_categories in prototypes\equipment\equipment-grid2.lua
This allows to put the Nuclear Generator into the armor.
------------------------------------------------------------------------------------------------------------------------------
Tldr: Correct technology name is rampant-arsenal-technology-power-armor-mk3 instead of power-armor-mk3
Cu, steinio.
- Attachments
-
- Rampant Armor MK4_0.0.1.zip
- (33.01 KiB) Downloaded 83 times
Re: Using another mods technology as a prerequisite
Note that mod portal doesn't accept new mods with spaces in the name.steinio wrote: Tue Apr 28, 2020 5:39 pm First i recognized is, you didn't named the folder right.
It has to have the same name like in the info.json, followed by an underscore and the version number.
info.json -> name: Rampant Armor MK4
zip name: Rampant Armor MK4_0.0.1
folder name: RampantArmorMK4_0.0.1 -> correct: Rampant Armor MK4_0.0.1
So the name must be:
RampantArmorMK4 or Rampant-Armor-MK4 or Rampant_Armor_MK4
The same changes in folder name and zip file name.
Re: Using another mods technology as a prerequisite
How unfortunate.darkfrei wrote: Tue Apr 28, 2020 7:14 pmNote that mod portal doesn't accept new mods with spaces in the name.steinio wrote: Tue Apr 28, 2020 5:39 pm First i recognized is, you didn't named the folder right.
It has to have the same name like in the info.json, followed by an underscore and the version number.
info.json -> name: Rampant Armor MK4
zip name: Rampant Armor MK4_0.0.1
folder name: RampantArmorMK4_0.0.1 -> correct: Rampant Armor MK4_0.0.1
So the name must be:
RampantArmorMK4 or Rampant-Armor-MK4 or Rampant_Armor_MK4
The same changes in folder name and zip file name.
Then the image references also need to be adjusted again...
-
- Burner Inserter
- Posts: 11
- Joined: Sun Nov 27, 2016 12:25 pm
- Contact:
Re: Using another mods technology as a prerequisite
Thanks guys, I really appreciate you taking a look. I knew there was something I had to be missing in the original Rampant mod. I've got it all working now. The only thing left to do is modify some recipes and stuff to my liking.
As for the migrations: That's something I forgot to delete, I've actually just been modifying an existing mod called Power Armor MK4. Rampant actually already had some compatibility for it; except I didn't like that it ended up creating redundancies in there being two power Armor MK3's.
As for the migrations: That's something I forgot to delete, I've actually just been modifying an existing mod called Power Armor MK4. Rampant actually already had some compatibility for it; except I didn't like that it ended up creating redundancies in there being two power Armor MK3's.