Jump to content

Example mods


rooks

Recommended Posts

  • Developer

I've made a couple mods public on the Steam Workshop.  One is the Havarian mod, which should serve as a simple example of adding new language support.  The other is called Shel's Adventure, and has examples of other types of supported mod content.  (I should make clear that this mod is not meant to be a fully playable campaign, just an implementation example)

As more mod features get added to the game, I will be implementing them in these mods as an example of the recommended way of doing things.  They will be most compatible with the latest dev build (Experimental will be the closest thing).

Of course, for now, you'll need to join the Griftlands Modding Beta group on Steam to access these.  After that, you can Subscribe and enable them using the Mod Inspector (CTRL+5) by checking the checkbox next to their ID.  Proper in-game UI for enabling mods will be be coming in the next few days.

 

 

Link to comment
Share on other sites

  • Developer
2 hours ago, RageLeague said:

 

Also, while showcasing the mod feature, make sure that feature works.

 

That's weird, looks like you're running a slightly out of date build which doesn't have the new API.   I just ran experimental with the mod and it works for me.  Did you figure it out?

I'll probably add some way to for mods to require specific versions of the game to safeguard against older builds.

Link to comment
Share on other sites

10 hours ago, rooks said:

That's weird, looks like you're running a slightly out of date build which doesn't have the new API.   I just ran experimental with the mod and it works for me.  Did you figure it out?

I'll probably add some way to for mods to require specific versions of the game to safeguard against older builds.

I think that was before the latest update. With the latest update, i guess RequireMod is defined, and it worked.

Link to comment
Share on other sites

is it possible to have some mod behavior changes based on your other mod installed? for example, if i want to add PC Shel as one of the characters my cross character campaign mod supports, i want to optionally check whether the example mod is loaded before i add a mutator option.

Link to comment
Share on other sites

I found out about the new update to the shel adventure mod by accidentally clicked on the "Ask for work" button. It's clear that that particular convo is added through the mod.

The question is, is there a good way to disable convos? something like this convo will only show up if you play shel's campaign.

I also need this feature to suppress one of the existing convo for my campaign(the provoke one), because it doesn't make much sense in that campaign.

Link to comment
Share on other sites

  • Developer
On 9/9/2020 at 4:05 PM, RageLeague said:

is it possible to have some mod behavior changes based on your other mod installed? for example, if i want to add PC Shel as one of the characters my cross character campaign mod supports, i want to optionally check whether the example mod is loaded before i add a mutator option.

The order of mod loading is undefined, but the "OnLoad" function has special functionality whereby it can return another function to be called after all other OnLoad functions have been completed for other mods.

This would allow you to query what other mods have done during their OnLoad phase.  I added an empty PostLoad function illustrating this in Shel's adventure.

40 minutes ago, RageLeague said:

I found out about the new update to the shel adventure mod by accidentally clicked on the "Ask for work" button. It's clear that that particular convo is added through the mod.

The question is, is there a good way to disable convos? something like this convo will only show up if you play shel's campaign.

I also need this feature to suppress one of the existing convo for my campaign(the provoke one), because it doesn't make much sense in that campaign.

Individual conversations can of course check the current act to ensure they don't show up elsewhere ,but there's no good way to disable other conversations.  I will work on this tomorrow and hopefully have a solution soon.

 

Link to comment
Share on other sites

  • Developer
On 9/10/2020 at 4:54 PM, RageLeague said:

The question is, is there a good way to disable convos? something like this convo will only show up if you play shel's campaign.

I also need this feature to suppress one of the existing convo for my campaign(the provoke one), because it doesn't make much sense in that campaign.

In the current experimental build, you can define a conversation filter that can yea or nay conversations.

You can check shels_adventure.lua of the example mod for the function signature, and to suppress the provoke option you can compare convo_def.id to "HATED_CHAT".

To ensure newly defined mod conversations only apply in a specific act, I've been checking the act_id directly within those conversations.

eg. here's the Hub function of trade_convo.lua in the example mod:

    :Hub( function(cxt, who)
        if cxt.act_id ~= "SHELS_ADVENTURE" then
            return
        end

 

 

15 hours ago, minespatch said:

It looks like I can't access any mods in the game.

 

Are you a part of the Griftlands Modding Steam Community group, and playing on Experimental?

Link to comment
Share on other sites

On 9/14/2020 at 12:16 PM, rooks said:

In the current experimental build, you can define a conversation filter that can yea or nay conversations.

You can check shels_adventure.lua of the example mod for the function signature, and to suppress the provoke option you can compare convo_def.id to "HATED_CHAT".

To ensure newly defined mod conversations only apply in a specific act, I've been checking the act_id directly within those conversations.

eg. here's the Hub function of trade_convo.lua in the example mod:


    :Hub( function(cxt, who)
        if cxt.act_id ~= "SHELS_ADVENTURE" then
            return
        end

 

The mod isn't updated, it seems. The last update is on the tenth, but this post was made on monday, the 14th. That exploit we found where you can infinitely buy/sell commodities also doesn't appear to be fixed, despite what the update log says, because I saw people complaining on Steam.

Link to comment
Share on other sites

  • Developer
23 hours ago, RageLeague said:

The mod isn't updated, it seems. The last update is on the tenth, but this post was made on monday, the 14th. That exploit we found where you can infinitely buy/sell commodities also doesn't appear to be fixed, despite what the update log says, because I saw people complaining on Steam.

Oversight on my part, I thought I had pushed an update for it when I hadn't!  Update week tends to be a busy week.  Those changes are on workshop now.

22 hours ago, Hekateras said:

Regarding load order, I wonder if the approach used for Sequential Mod Loader for Invisible Inc modding could be adapted for Griftlands? The modding so far looks quite similar to that, and determining load order is really useful there. https://steamcommunity.com/workshop/filedetails/?id=580661011

lib_sequentialModLoader.lua 2.01 kB · 0 downloads @RageLeague

Right now it is possible to return another function from OnLoad -- this function will be run after all other mod OnLoad functions, and itself can return another "post-load" function, indefinitely.  This lets you add behaviour that runs only after other mods' first-pass OnLoad behaviour, which is a way of handling inter-mod dependencies.

But just so I'm clear, do you have any use cases in mind for controlling load order of mods?.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...