RageLeague Posted September 20, 2020 Share Posted September 20, 2020 Take a little guess what this is. Link to comment Share on other sites More sharing options...
RageLeague Posted September 21, 2020 Author Share Posted September 21, 2020 Spoiler That's right. I'm adding a character randomizer. Everything will sure go according to plan. 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 More sharing options...
Developer rooks Posted September 21, 2020 Developer Share Posted September 21, 2020 19 hours ago, RageLeague said: Reveal hidden contents That's right. I'm adding a character randomizer. Everything will sure go according to plan. 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 More sharing options...
RageLeague Posted September 22, 2020 Author Share Posted September 22, 2020 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 More sharing options...
RageLeague Posted September 22, 2020 Author Share Posted September 22, 2020 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. Which makes combat really confusing, and doesn't really work, since the character builds don't have shared animations. 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 More sharing options...
Developer rooks Posted September 22, 2020 Developer Share Posted September 22, 2020 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 More sharing options...
RageLeague Posted September 22, 2020 Author Share Posted September 22, 2020 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 More sharing options...
RageLeague Posted September 23, 2020 Author Share Posted September 23, 2020 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? You can't know for sure, because his boon/bane, or even his death loot doesn't show up in the compendium. Even in the relationship screen, nothing shows up unless you have an active boon/bane. 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 More sharing options...
RageLeague Posted September 24, 2020 Author Share Posted September 24, 2020 I'm starting to expand my mod to cover non-talkers as well. 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 More sharing options...
Recommended Posts
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.