• Content Count

  • Joined

Community Reputation

185 Excellent

About rooks

  • Rank
    The Untitled


Recent Profile Visitors

1434 profile views
  1. If I'm understanding your intent correctly, can you just override the CanBeTargetted function of Protect so that it only validates for stacks of >= 3? Something like this: local pdef = Content.GetBattleCondition( "PROTECT" ) pdef.CanBeTargetted = function( self, card, fighter ) if card:IsAttackCard() and not self.owner:HasCondition("STUN") then if fighter:GetTeam() ~= card:GetOwner():GetTeam() and card.owner:GetTeam() ~= self.owner:GetTeam() then if self.owner:GetConditionStacks( "PROTECT" ) >= 3 and fighter ~= self.owner and not (fighter:GetConditionStacks() >= 3) then return false, self:GetLocalizedString( "PROTECTED" ) end end end return true end You'd have to replace OnPostDamage and the STATUS_CHANGED handler as well if you wanted it to remove more than 1 stack at a time.
  2. You will need to download the latest version of FMOD Studio, but will require a project file compatible with the game to build new banks. There will likely be a mechanism to remap sounds, similar to how is done in DST. We are looking into seeing what's possible for this but there is no specific timeline.
  3. You'll need to call Content.AddSlideShow to first load your slides into the content db, and then reference it by the provided id: modinit.lua: local slide_id = "starting_slides" local slide_tables = require "MODALIAS:starting_slides" Content.AddSlideShow( slide_id, slide_tables ) then, in AddAct: slides = { "starting_slides" } I've updated Shel's Adventure to include some custom slides, as a reference.
  4. This update adds a third playable story character: Smith! Smith's story takes place on a unique map, with new locations, quests, and characters to interact with. Smith has his own negotiation and combat cards, and uses new exclusive mechanics. Play The First Two Days The first two days of Smith's story are currently playable. There are a lot of alternate quests to play in Smith's story, and you'd have to play through at least six times to see them all. Smith's final story will have 4 days, like Rook. You can unlock Smith by beating Rook's first day. You can unlock Smith's Brawl by reaching the end of his story as it exists now. Run History! We've also added a Run History screen, so you can look back at past victories and losses. New NPCs! Without spoiling too much, here's a teaser of the things that you'll find in Smith's story: As always, there have been a whole slew of general fixes and balance changes. Have fun Smithing about in Pearl-On-Foam, everyone! Our next update will be on Dec 10. The next day of Smith's story is projected to come out in late January. As always, you can get a sneak peek at the upcoming content and follow along with our day-to-day development by opting in to the Experimental build. You'll see the changes that we make as we make them, and be able to give immediate feedback. Complete Patch Notes:
  5. I added a 'can_flush' flag to quest defs. If this is set to false, then GameState:FlushSideJobs will skip that quest. eg This will be available after build r438212.
  6. OnUnapply, if it exists, will get called whenever the modifier is removed in whatever fashion.
  7. This should be fixed in the next experimental (the argument was only set up to be used by NPCs). In your snippet above, I'm guessing it is meant to be adding the "DISTRACTED" modifier, not "DISTRACTION"? When testing that card, one thing I noticed is that as written, Distracted will trigger due to playing the card itself, which might not be what you want. If so, you could defer the application of the modifier like so:
  8. Nice work! I think it'd be good if the mod sorting was built-in to the game. Do you have any issues if I put your function into the game directly, possibly with edits if required?
  9. This is something pretty hard to do in the current release build, so I made a change in experimental (you'll see it next push) to support this a little easier. Here's an example stab attack that does one extra hit per stack of Power on the selected target. Pay particular attention to 'hit_anim = true', which basically tells the presentation to replay the same anim for each attack, and of course, the CALC_HIT_COUNT event handler. Hopefully this sets you on the right path.
  10. The process for making an entire outfit involves a couple of external tools and scripts that aren't included in the game unfortunately. I imagine with some skilled reverse engineering it would be possible, but for now it's a bit beyond the scope of what's possible with the existing mod tools.
  11. Even though I don't disagree with your reasoning about the casting, it's pretty risky to change the default at this point because it's used in a lot of places and I'm not sure which ones are relying on validation for subtle reasons. One option is to define a wrapper function in your mod and use that instead. I updated Bossbit to have a can_talk flag, so that he can show up in plaxes. By default, non-sentients won't show up so they don't occupy slots.
  12. This should be workable. I'll change those order of operations on the dev line and see if anything undesireable falls out. If it's all good, the change will eventually find its way to release.
  13. Thanks! This fix will be included in the next experimental build.
  14. 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. 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?.
  15. Overview This is a very brief set of instructions on how to create a new empty mod for Griftlands. This is not a tutorial and assumes basic knowledge of Lua. The best way to learn how to add specific pieces of content to your mod is to subscribe to Shel's Adventure and Havarian and view the code. These example mods illustrate many basic features, like adding cards, grafts, and new campaigns. Running the game in debug Running the game in debug will unlock a slew of facilities to aid you in development. It is not strictly necessary to run in debug to either run or develop mods, but it will probably be helpful. Epic -> Go to Settings > Griftlands and check "Additional Command Line Parameters". In the edit box, enter --debug. Steam -> Right click Griftlands in your library and click "Properties". Click "Set Launch Options", enter --debug in the edit box and click Ok. A description of all the game's debug functionality is beyond the scope of this article, but for our purposes, it is useful to know that CTRL+5 will open a debug panel listing any mods the game has discovered. Once you create a mod or (eventually) install other user-created mod content, you will see their appearance here. You can enable or disable them from this panel. Creating an empty mod Browse to your Griftlands save directory. Windows/Steam -> %APPDATA%/Klei/Griftlands/steam-<steamID>/ Windows/Epic -> %APPDATA%/Klei/Griftlands/<EpicID>/ If you see a saves/ directory, a log.txt, and other game-generated files, you will know you are in the right place! Create a new folder named 'mods' if one doesn't already exist. This folder houses all local mod content. Inside the 'mods' folder, create another folder with the name of your mod. Inside that folder, create a text file called modinit.lua. This file will be executed when your mod is installed and enabled. This file should return a table which will serve as your mod's run-time state. There are a few properties it can have which have special meaning. Here are some of them: OnLoad: this must be a function that receives one parameter, your mod's table. This function is called by the game after loading all core game content and is where your mod can load its own assets and game content. OnPreLoad: this must a be a function that receives one parameter, your mod's table. This function is similar to OnLoad, but is called BEFORE the game loads all its game content. In general, the only reason to use OnPreLoad is to load .po files for translations, because these need to be in memory before the rest of the game content is loaded for string lookup. alias: This is an optional (but useful) string which specifies a filepath alias by which your mod can reference files within its directory. title: This is the name that will represent your mod when you see it in game. When you upload your mod to Workshop for the first time, it will be named after this string. description: This is a description of what your mod is. When you upload your mod to Workshop for the first time, it will receive this description. previewImagePath: This is a path to a filename of a .png within your mod directory that will be used as the when your item is seen in the Workshop. Sharing Your Mod One way to share your mod is simply to distribute your folder to players. They can then use the above process to copy your mod in to their local mods/ folder. If you are playing Grifltands on Steam, the preferred way is to use Steam Workshop to distribute your mods, and also download other mods. Note that the mods distributed through Steam Workshop do not appear in your local user folder, but in a special Steam folder on your computer. Uploading to Steam Workshop To share a mod that you have locally in your settings folder, you must first enable --debug mode. Then, hit CTRL+5 to open the Mod inspector. In this panel you should see your own mod listed. Click the "Upload to Workshop" button to upload your mod to Steam! The first time your mod is uploaded, you may notice a new file called steam_workshop.txt in your mod folder. You should keep this file, as it references the workshop id of your mod. The next time you upload to Workshop, this file is used to update the same workshop item you previously uploaded. Deleting your mod from Workshop If you no longer wish to distribute your mod, you can Delete it by signing into Steam Workshop and clicking the "Delete" option under Owner Controls. Note that any user which has already subscribed and downloaded your mod will continue to have access to it, until they Unsubscribe. If you wish to later redistribute your mod again, you will need to ensure you are creating a NEW workshop item for it. To do this, delete the auto-generated file steam_workshop.txt in your mod folder. This will ensure a new workshop item is generated the next time you upload. If you try to Upload your mod with the old workshop id that was previously deleted, you will receive an error when Uploading. Example Mods To get started, a good way is to download the example mods from Steam Workshop and inspect their contents. 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)