Mod dependency in (tips and (tricks or (Info)))

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

S_gamez
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sat Mar 21, 2020 9:44 pm
Contact:

Mod dependency in (tips and (tricks or (Info)))

Post by S_gamez »

Want to suggest a way to allow tips and tricks to be enable by Mods or NotMods in mod. Should a mod change some that would only be relevant if both mods or not mods are there?

My case is that i change a lot of things Power armour MK 3 mod but i don't see why trigger my tips/info regarding that mod if the mod isn't there.
Please let me know if a prototype section for this can be made unless it is a API function already.


kinda what i would like is 2 lines added to

Code: Select all

type = "tips-and-tricks-item",
which my example would be

Code: Select all

notmods_dependencies = {""}, or/and
mods_dependencies = {""},
--similar to the current
dependencies = {""} that has to do with depending on a different tips and tricks, not mods.
Last edited by S_gamez on Mon Feb 17, 2025 4:46 pm, edited 1 time in total.
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Mod dependency in (tips and (tricks or (Info)))

Post by Muche »

Tips & tricks are already part of prototypes.
See TipsAndTricksItemCategory and TipsAndTricksItem.
S_gamez
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sat Mar 21, 2020 9:44 pm
Contact:

Re: Mod dependency in (tips and (tricks or (Info)))

Post by S_gamez »

Muche wrote: Mon Feb 17, 2025 3:06 pm Tips & tricks are already part of prototypes.
See TipsAndTricksItemCategory and TipsAndTricksItem.
That does not answer the question nor does it help me make it have If mods["modname"] specifics. just in a tips and tricks way.
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Mod dependency in (tips and (tricks or (Info)))

Post by Muche »

You can still do (somewhere in data-updates, I'd guess)

Code: Select all

if mods["othermod"] then
  data.raw["tips-and-tricks-item"]["powerarmormk3"].dependencies = ["othermod-armors"] -- depend on othermod's tip&trick
else
  data.raw["tips-and-tricks-item"]["powerarmormk3"].dependencies = ... -- default dependencies
end
S_gamez
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Sat Mar 21, 2020 9:44 pm
Contact:

Re: Mod dependency in (tips and (tricks or (Info)))

Post by S_gamez »

Found a functional solution but still wish it could be simplified with suggested function under prototype for

Code: Select all

types = "tips-and-tricks-item"

Code: Select all

--Current solution
if mods["Power Armor MK3"] then
	data:extend({
		{
			type = "tips-and-tricks-item",
			name = "par_power_armor_mk3-info",
			category = "power-armour-replacer",
			dependencies = {"par_cas-info"},
			starting_status = "unlocked",
			order = "3AA",
			indent = 2,
		},
	})
end
Post Reply

Return to “Ideas and Suggestions”