Jump to content

New side mod that I'm working on


RageLeague

Recommended Posts

Spoiler

That's right. I'm adding a character randomizer. Everything will sure go according to plan.

image.thumb.png.3212baf3630ca0b3f4ca8046b9a688d7.png

image.thumb.png.7e1ac78d2084b0733a572d76be898516.png

image.thumb.png.0508788bb39edc0534053ee1e7a7a0ae.png

image.thumb.png.d38eaf22d3d9032fd97dd4473cbbe218.png

image.thumb.png.39df2b5b70e3d2fefe87f9387cdcc516.png

Also, a question for @rooks: would there be any problem if in the function GameState.InitializeAct for the act to be initialized before the region is being initialized? Something like this:

function GameState:InitializeAct()
        engine.inst:ProfilerPush("InitializeAct")
    
        self.current_act = self.options.start_act
        local act_data = GetPlayerActData( self.current_act )
     
        self.notifications:EnableNotifications( false )
    
        act_data:InitializeAct( self, self.options and self.options.custom)

        local region_id = act_data.data.world_region   
        self.world_region_id = region_id
    
        local world_region = Content.GetWorldRegion(region_id)
        assert(world_region, region_id)
        
        self.region = Region(region_id)
        self.region:PopulateGameState( self )
    
        local max_resolve = act_data.data.max_resolve or self.player_agent.max_resolve
        if max_resolve then
            local advancement_mod = GetAdvancementModifier( ADVANCEMENT_OPTION.LOWER_MAX_RESOLVE )
            if advancement_mod then
                max_resolve = math.round(max_resolve * advancement_mod)
            end
            self.caravan:SetMaxResolve( max_resolve )
        end
    
        self:UpdateWorld()
    
        if not self.options.no_act_quests then
            self:GetCurrentAct():SpawnQuests( self.options )
        end
        
        self.notifications:Clear()
        self.notifications:EnableNotifications( true )
    
        engine.inst:ProfilerPop()
    end

Currently, the functionality is tied to a mutator, which is installed during act_data:InitializeAct( self, self.options and self.options.custom). It modifies the behaviour of agent creation. However, this can only happen when the world region isn't populated beforehand.

Link to comment
Share on other sites

  • Developer
19 hours ago, RageLeague said:
  Reveal hidden contents

Also, a question for @rooks: would there be any problem if in the function GameState.InitializeAct for the act to be initialized before the region is being initialized? Something like this:

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.

Link to comment
Share on other sites

Sorry to ask again, but when I tested this mod again with different algorithm to balance things out, I found out about three problems.

First, the function PlayerAct:SpawnQuests( options ) uses an invalid variable v when trying to spawn a main quest. You won't find it out normally, because you usually succeed in creating a main quest. But if the main quest fail to spawn, the error throwing actually caused the game to crash because v is undefined.

Second, it's less of a problem and more of an inconvenience, but when adding a quest cast by alias, it should be no_validation by default. Perhaps it should be the case for any cast that has a cast_fn, but maybe that's going a bit too far. You're already explicitly casting for something, which usually only adds 1 available cast member, and if no_validation is off, this might get filtered out due to some stupid reason, like member already casted in other quests, or agent being non-sentient. I found this out by trying to cast Bossbit by Nadan's alias in Sal's main quest(yeah, that's the result of my new algorithm).

Three, I have no idea whether to consider this a problem or not. Bossbit isn't displayed in a location, which is mildly annoying, because I can't talk to him as if he's Nadan.

Link to comment
Share on other sites

Spoiler

New mutator: It randomly changes the character's skin, but doesn't actually change the character. All the data are still from the old character.

image.thumb.png.06b8ce256f70eeeb0859a175f981cfba.png

Which makes combat really confusing, and doesn't really work, since the character builds don't have shared animations.

image.thumb.png.a1e5c1e14b4e5121981e74518cd613cf.png

Can you tell who this is?

Spoiler

That's right, it's Toeren, the Laborer, who is also a jarackle, just like *Snack*.

 

 

Link to comment
Share on other sites

  • Developer

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.

Link to comment
Share on other sites

That's what I think as well. Right now I added the thing where it automatically adds no_validation to the cast if cast by alias, and so far, I haven't encountered any problem with this particular function. I'm still surprised that the game runs no problem, considering how many functions I have tampered in this mod so far.

You could probably do something like this:

function QuestDef:AddCastByAlias( cast )
  -- ...
  if cast.no_validation == nil then
    cast.no_validation = true
  end
  -- ...
end

This way, if you want the validation, you can explicitly set no_validation to false, so that it can check the validity of the agent.

Link to comment
Share on other sites

Behold! My dirtiest trick in my mod:

Spoiler

This mod adds a mutator that gives everyone a "disguise skin". Is Frash here really Frash, and not some Spree thief or some Jakes Lifter?

image.thumb.png.0cc1e06fd88a227bee0eb01be0b7fd52.png

You can't know for sure, because his boon/bane, or even his death loot doesn't show up in the compendium.

image.thumb.png.9beb57ba44f3a0c573e71ad8410b718d.png

Even in the relationship screen, nothing shows up unless you have an active boon/bane.

image.thumb.png.3ef63b4dd93af3a4f8309782d8e48a18.png

The only ways to deduce a person's identity are: Knowing the story well, and who's supposed to show up at certain story segment; get their boon/bane, which might cost you(or get the option to gift, that works too); negotiate with them to get their actual faction, or fight with them and deduce their identity from static buffs and attacks, in which case, it might be too late!

To make matters worse, you can choose the mutators in a way so that the agent spawned is even randomized, so anyone can be behind that mask.

 

Link to comment
Share on other sites

I'm starting to expand my mod to cover non-talkers as well.

image.thumb.png.d99ac074825228882e676d2192c54d9b.png

But why is DRUSK_2 not a boss, that's a very good question. At least this is just a skin swap rather than an agent swap. Then you'll fight a day 3 boss. The drusks also have a combat strength of undefined(which is equal to one by game's default).

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...