GithubHelp home page GithubHelp logo

iguanacore / iguana_acs_functions Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 344 KB

A mod, consisting of functional changes for Amazing Cultivation Simulator, not just fixes

License: MIT License

Lua 25.41% C# 74.59%

iguana_acs_functions's Introduction

Iguana's Overhaul, functional changes

A mod, consisting of functional changes for Amazing Cultivation Simulator, not just fixes.

Currently implemented changes

  • Fix Trimerous Essence Price - The Trimerous Essence Pill has a buy price and item quantity equal to equivalent items (SR pool).
  • Change Talisman of Foreseer from "Advanced Talismans" and "Luck with Talisman Room" to 96% quality, so it actually has an adventure exploration effect
  • The golden core tier 3 has a 90% chance for breakthrough at PS instead of the current 10%, more in line with the effect at T2 (100%) and T4 (25%) and its effect on breakthroughs at golden core (150% like T2).
  • Skill Level Everywhere (optional with files deletion) - Displays Skill Level instead of Ability Rating (Standalone mod)
  • Story Button Interaction Change - Changes the interaction with Ancient Caskets and Festive Goods, making it select an opener randomly.
  • Sort Manuals by Attainment (optional) - Sorts the manuals by ascending attainment in the Manual Library. Also displays a small element icon next to manuals. Takes into account the element of the cultivator if any (Standalone mod)
  • Sync Perfect Alignment moodlet - the perfect alignment moodlet is changed to trigger at the same element strength (1.85) as optimal cultivation speed and golden core
  • Heavenly Reforge Limit increased (optional) - Increases the Heavenly Reforge Cap from 36 (Vanilla) to 2048. (Standalone mod)
  • Agency Population Limit increased (optional) - Increases the Agency Population limit from 400 000 (Vanilla) to 999 999. (Standalone mod)
  • Farmable Strange Mushroom - Adds Strange Mushroom as a rare drop to the Mushroom plant, with similar rates to Red Ginseng.
  • Wudang DLC Translation" - Translates the Duck and related untranslated content added with the Wudang DLC
  • Fix Camping Head UI (optional) - Various improvements to the Head UI when camping (Standalone Mod)
  • Add Sect Rules (optional) - better control over the popups when playing, both through additional Sect Rules and Concern/Neglect Sect Event rules. See detailed changes in the [Standalone Mod description]
  • Infinite Mouse Scrolling (optional) - Removes the limit to zooming out with the scroll wheel, matching prior behaviour with PageUp. (Standalone mod).
  • Instant Story Hotkey (optional) - Instantly choose the story option associated with an hotkey when pressing the key.
  • Display Base Mental State (optional) - Displays the base mental state superimposed over the current mental statein the profile info for Xiandao cultivators (Standalone mod).
  • Display max Mood at 200 (optional) - Whenever the game uses mood for calculations, it uses 200 as maximum value and not 100 as it is displayed in-game. This corrects the in-game indicators to treat 200 mood as the actual maximum to avoid confusion. Everything that isn't marked as optional can still be manually disabled by removing the modified entities from the mod files.
  • Display Adventure Results Notifications - Adds a small notification on adventure return if some harvest has been obtained.
  • Chance Estimation Precision - Increases the precision of estimates from GetRateString, anything below 1% is listed now as insignificant.
  • Formation Sharing - Reveals the Formation Diagram Sharing/Import buttons, in both normal gameplay as well as RPG Map Maker.
  • Body Cultivation+ Less Grindy Remolding - Improves and Makes the remolding process simpler, faster, and cleaner. filter either by selecting label(s), or by color(s). and also the option to ignore labels required to unlock a secret body.

Install instructions

Download the latest release, extract the iguana_acs_functions into the Mods folder. If the release is behind the Main version and you want to update to the preview version, download the repository directly, and extract the contents of the archive into the iguana_acs_functions folder, located in the Mods folder. (Due to the inclusion of Harmony Patches, it's best to stick with the Release.)

Activate the Mod in Mod Manager, make sure to load it after any of the prerequisite Mods.

For ensuring that Patches are loaded, restart the game.

Configuration

Some of the changes are configurable on a per-save basis. To do so, in the menu item System's dropdown select "MLL设置".

screenshot of the system menu dropdown with the cursor on the "MLL设置" option

You can then disable the changes you might not want to apply to your save. Some of these changes require you to save and relaunch the game then load to apply.

screenshot of the MLL Configuration menu

In case the mod modifies XML files, to disable it entirely you'll need to remove the XML files related to the mod from its subfolders.

Compatibility with other mods

The full list of changed entities can be seen at the bottom. This mod does not guarantee compatibility with any of the mods that also change those entities.

Suggested Load Order

List of changed entities

Below is a list of changed entities. To revert a particular change from the mod, either comment out the relevant lines and entities, or delete the files in question. Changed files in the Language\OfficialEnglish directory are related to translation and can be reverted by removing them.

For example, removing the Trimerous Essence Price change requires the removal of iguana_acs_functions\Settings\ThingDef\Item\Item_DLC_WuDang.xml, as well as the corresponding file under Language\OfficialEnglish.

Items

  • Item_Dan_SanHuaHuangJing - Fix Trimerous Essence Price
  • Item_StoneBox2 and Item_SpringBox - Ancient Caskets and Festive Goods, related to Story Button Interaction Change

Plants

  • Mushroom - Farmable Strange Mushroom

JianghuNpc

  • Npc_WuDang_1 - Wudang DLC Translation

MapStories

  • (MapStory_Item) Story_Item_E_FuBox - Change Talisman of Foreseer in starting experiences
  • Settings/MapStories/... - Add Sect Rules:
    • MapStory_FillingLv1.xml : City_Base, Business_Base
    • MapStory_FillingLv2.xml: Story_LingZhiGet, Story_LingZhiBeg
    • MapStory_Special.xml: Secrets_Esoterica1, Secrets_Esoterica2, Secrets_FabaoAppear1, Secrets_FabaoAppear2, Secrets_FabaoAppear3, Secrets_FabaoAppear3_Cold, Secrets_FabaoAppear3_Hot, Secrets_DongFuAppear, Secrets_DongFuAppear_Cold, Secrets_DongFuAppear_Hot, Secrets_DongFuAppear_Manual, Secrets_DongFuAppear_Medicine, Secrets_Magic, Secrets_Magic_Cold, Secrets_Magic_Hot
    • MapStory_SpecialGong.xml: Secrets_Gong2, Secrets_Gong3, Secrets_Gong4, Secrets_Gong5, Secrets_Gong6,Secrets_Gong7

Properties

  • SkillProperty - Skill Level Everywhere

Message displays / UI Events

  • Settings/MsgShow/Event/EventShow.xml - Event display changes for Add Sect Rules
  • Settings/MsgShow/Rule/Rule,xml - Rule changes for Add Sect Rules
  • Settings/Ui/NpcUIEvent/NewNpcUIEvent.txt - Add Sect Rules

Functions

Modifications applied by iguana_acs_functions.dll.

  • FabaoData.AddGodCount, FabaoData.LoadInit - Heavenly Reforge Limit increased, Transpiler changing ldc.i4.s 36 to ldc.i4 2048
  • OutspreadMgr.Region.AddPopulation, OutspreadMgr.Region.RawAddPopulation, OutspreadMgr.GetRegionPopulationAddPerday - Agency Population Limit increased, Transpiler changing ldc.i4 400000 to ldc.i4 999999
  • Wnd_StorySelect.SelectClicking - Instant Story Hotkey
  • MapStoryMgr.TriggerStorySelection, MapStoryMgr.DidStorySelect, MessageMgr.AddMessage, MsgShowMgr.GetStorySelect- Add Sect Rules
  • Panel_ThingInfo.ShowNpc - Display Base Mental State
  • PlacesMgr.Step, Wnd_GameMain.AddNpcHead, Wnd_GameMain.AddNpcHeadSimple - Fix Camping Head UI
  • UILogicMode_Global.OnScroll - Infinite Mouse Scroll
  • Wnd_StorySelect.SelectClicking - Instant Story Hotkey
  • Panel_NpcInfoPanel.UpdateSkill, Panel_NpcPropertyPanel.UpdateSkill, Wnd_NpcWork.ItemRoolOver - Skill Level Everywhere
  • Wnd_CangJingGeWindow.CheckEsoLise, Wnd_CangJingGeWindow.RenderEsoListItem - Sort Manuals By Attainment
  • Wnd_NpcInfo.OnInit, Wnd_GameMain.OnInit - Display max Mood at 200
  • GameUlt.GetRateString - Chance Estimation Precision
  • Wnd_CreateZhen.OnShown - Formation Sharing
  • Wnd_BodyRollShow.Begin, Wnd_BodyRollShow.OnHide, XiaWorld.PracticeMgr.GetRandomQuenchingLabelList - Body Cultivation+ Less Grindy Remolding

Other files

  • Scripts\main.lua - main LUA mod loading utility
  • Scripts\fix-gc-tier3-breakthrough-multiplier.lua - GC T3 breakthrough multiplier fix
  • Scripts\sync-perfect-alignment-moodlet.lua - Sync Perfect Alignment moodlet
  • Scripts\MapStory\MapStory.lua - Agency Population Limit increased, MapStoryHelper.SlightlyIncreaseAllPop and MapStoryHelper.IncreaseAllPop
  • Scripts\add-sect-rules.lua - Add Sect Rules
  • Scripts\bodypracticeplus.lua - a lua extension for Body Cultivation+, initializes and sets up the UI required by the mod.
  • UI\BPP_List_fui.bytes - Body Cultivation+'s UI.
  • iguana_acs_functions.dll - Configuration and Functions

How to Contribute

Any Issues/Pull Requests are welcome. To ensure a similar level of quality between all parts of the mod, here's a few guidelines.

When changing vanilla aspects, keep in line with the original naming logic.

  • If the original was MapStory_Item.xml, the PR should use the same filename with MapStory_Item.xml.

If the fixes exist as a standalone mod, include a link to it.

Credits/Contributions

  • ucddj - Trimerous Essence Price, FuBox change, Skill Level Everywhere, Sort Manuals by Attainment, Sync Perfect Alignment moodlet, Fix Camping Head UI, Add Sect Rules, Infinite Mouse Scrolling, Instant Story Hotkey, Display Base Mental State, Display max Mood at 200, Display Adventure Results Notifications
  • Gothmos - Add Sect Rules
  • NecrCode - Skill Level Everywhere additions, Body Cultivation+ Less Grindy Remolding

iguana_acs_functions's People

Contributors

iguanacore avatar necrcode avatar ucddj avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ucddj necrcode

iguana_acs_functions's Issues

Implement Formation import and export

Implement (and complete) an existing mod(iguana_ZhenImportExport).

The current dirty version is having a Diagram window open, and launching the following console commands:

CS.Wnd_CreateZhen.Instance.UIInfo.m_n39.visible=true
CS.Wnd_CreateZhen.Instance.UIInfo.m_n40.visible=true
CS.Wnd_CreateZhen.Instance.UIInfo.m_n105.visible=true

But that method is not an option in Immortal and higher difficulties.

Display Base Mental State UI bug

ModLoaderLite settings related, when the save file is corrupted or missing, selecting someone who has Mental State (like Xiandao), the UI bugs out.

One way to replicate the issue:

  • Delete the .MLL file for the save
  • Load that save file
  • Select a Cultivator
  • Issue appears

Another way of replicating the issue:

  • Start a new run
  • Save the game, use a new and unique name for the save file
  • Load that file
  • Select a Cultivator
  • Issue appears

After the issue appears, it can be solved by rewriting the save file (which creates a new and working .MLL file for the save) and loading the rewritten file.
One possible solution could be making the aspect disabled by default, and requiring the player to enable it.

PracticeElement1 is at 1.90 but actual perfect alignment is 1.85

The +15 Moodlet "Perfect Alignment of the Five Elements" displays at 1.90 element composition strength but the cultivation / golden core breakthrough are optimal both at 1.85.

While this has never been an issue so far, lowering the requirement for the moodlet to 1.85 for homogeneity could help a player experimenting on their own to find the optimal composition by themselves.

In case a tool is developed in the future to recommend cultivation rooms, it will also allow players to verify the element composition strength by themselves by checking the moodlets..

Rework the Trigrams Cushion

In the current vanilla state, the Trigrams Cushion (Building WuDangPuTuan) is clearly and objectively a bad choice to use as a Cushion.
While there is a mod on the workshop to improve it, it simply boosts the Qi Gathering value of it, nothing else.

The following is a possible list of changes that could make it into a reasonable option for a run:

  • Increasing the Base Coziness. AoM is at 1.4, Qi Cushion is at 1, maybe something between those at 1.2?
  • Increasing the Qi Gathering effect. 60 for a single tile while occupying 6 isn't enough. Maybe 300 and increasing the Range?
  • Removing the Feng Shui Building aspect and turning it into an Emitter. A recent post on the Cultivation Efficiency Guide on Steam gave a good example on why being a Feng Shui Building is bad for a large Building in the middle of an Array. Turning it into an emitter would fix that aspect, while also providing an additional source of the Feeding Element.

Wudang Duck not appearing

The wudang duck doesnt appear in any of the wudang locations with this mod enabled, as he does with iguana_WudangTranslation.
I'm not sure if the intended behaviour is to have him always appear as he does with iguana_WudangTranslation, so not sure if bug.

Expand and implement Property Revealer

Expand and implement an existing mod (iguana_PropertyRevealer).

Some properties are hidden, but are still useful to know for the player, like Qi Absorption Speed Bonus. This would reveal those properties, and properly categorize them.

GetRateString % approximation rounds down to lower dozen

As mentioned in iguanacore/iguana_acs_fix#58, a lot of game estimates use GetRateString, which rounds down to nearest 10 (or says insignificant if below 10%). This is very obviously designed that way, but it's also pretty bad ?

I'd just change it to rounding down to the nearest %. Roudning down makes sense to avoid people having a failure when it's 100% is displayed and not understanding why, but 10% accuracy is ridiculous.

It's also possible to round to nearest 5%, but always round down if 95%+. Whatever the solution chosen, I don't think 10% is a step precise enough.

Agencies pop increase does not work correctly

Explained here: https://discord.com/channels/608499065071861761/608499065071861764/1138662001002938438 (and next messages)

My hypothesis is that the issue comes from GetRegionPopulationAddPerday returning a NaN when population raises above 400,000, as the Math.Sqrt call receives a negative value parameter (https://learn.microsoft.com/fr-fr/dotnet/api/system.math.sqrt?view=net-7.0).

As a consequence, the Clamp in AddPopulation resets back agency pop at 50,000.

Would need to be tested to be sure however.

Implement Farmable Strange Mushrooms

Implement an existing mod (iguana_FarmableStrangeMushroom).

Not a bug, nor is it a totally new feature. Adding a special drop similarly to Red Ginseng and Ganoderma for the Mushroom plant.

Implement Agency Population uncapper

Implement an existing mod (iguana_OutspreadPopIncreaser).

With agency populations going over 400K, there can be further considerations at a later stage in the game. Doesn't make it easier to reach that point, just makes it possible to go even further.

Finish and implement RNG LUK relics

Finish and implement an existing mod (iguana_RNG_LUK_Relic).

With vanilla relic generation rules, the last two entries are never used for random relics. This means that LUK and all five stats will never appear for random relics. This does not make sense, as there's already a special category that will never appear for random relics (Ancient Relics serve that purpose).

Implement iguana_AppointChange

Implement an existing mod (iguana_AppointChange).

A part of functional changes, due to the original behavior being odd, just not broken.

Implement Wudang Translation

Implement an existing mod (iguana_WudangTranslation).

Changing the DLC NPC from CNOnly, and add translations for the related content, making them attainable in the EN version.

MLL doesn't handle autosaves

Apparently MLL doesn't handle autosaves(quicksaves), whenever you save a game ( be it a manual, auto, or a quick save) mll will create a file named as"{GameWatch.Instance.LoadFile}.mll", the thing is GameWatch.Instance.LoadFile will always store the name of the loaded save, and will (probably) only change when you load a save. so saving doesn't change its value at all.

This leads to MLL.Load() returning before calling OnLoad function, which reintroduce the bug fixed in commit bf733ad. but, this time, only when reloading saves that don't have an MLL file.

So the solution i came up with is:

 public class iguana_acs_functions
    {
        static EventCallback0 eventHandleConfig = new EventCallback0(HandleConfig);
        static int autosaveIndex = 0;
        //..
        //..
        //..
        //..
        public static void OnSave()
        {
            //each time the game autosave it will increment XiaWorld.GlobleDataMgr.Instance.AutoSave 
            if( autosaveIndex != XiaWorld.GlobleDataMgr.Instance.AutoSave )
            {
                //avoid making a permanent change to LoadFile. so MLL keeps working as intended 
                string tmp = GameWatch.Instance.LoadFile;
                autosaveIndex = XiaWorld.GlobleDataMgr.Instance.AutoSave;
                GameWatch.Instance.LoadFile = $"AutoSave{(autosaveIndex >= 5 ? 1 : autosaveIndex+1)}";
                //this leads to "OnSave" functions being called twice.
                MLLMain.Save();
                GameWatch.Instance.LoadFile = tmp;
            }
          //..           
          //..
          //..
        }
   }

note: We can prevent OnSave from getting called twice, by using a boolean that checks if onsave has been called, it would be set to true at end of OnSave, and false when OnLoad is called, and when the boolean itself is true. but this will work only for this mod.

I haven't pushed this change yet, as i'd like to hear your input on this. since this solution works for the case of autosaves, but it doesn't work when making new saves.

Implement Heavenly Reforge cap increaser

Implement an existing mod (iguana_GodCountIncreaserY2K).

Increases the cap for Heavenly reforges from 36. but nothing else. If someone wants to reforge their artifact a thousand times, why limit them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.