More Awesome Than You!
Welcome, Guest. Please login or register.
2024 April 26, 01:36:21

Login with username, password and session length
Search:     Advanced search
540270 Posts in 18066 Topics by 6513 Members
Latest Member: Linnie
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Awesomeware / AwesomeMod! / Re: AwesomeMod Bug Report Thread on: 2021 January 27, 04:54:05
Hi. So I just want to report a bug and the fix I made.

The bug:


When my household purchases an additional residential lot, the build/buy action in that purchased lot costs no money. This behavior does not appear on Vacation Homes and Purchased Community Lots/Venues.

After digging through Google, I found a thread at MTS: https://modthesims.info/t/614300, which one of the posters investigated that this bug does not appear in the game without AwesomeMod. I confirmed myself by taking out AwesomeMod, the bug disappeared.

Investigation:
I realized that AM has a feature that overrides the Build/Buy button, which indicates that the mod injects some additional code when transitioning from Live mode to Build/Buy mode. I identified the code in problem begins in Awesome.Main.OnEnterBuildBuy() method, which disable the family funds flag in the LotManager

private static void OnEnterBuildBuy()
{
    Lot sActiveBuildBuyLot = LotManager.sActiveBuildBuyLot;
    Navigation.ClearMaps(sActiveBuildBuyLot);
    if (sActiveBuildBuyLot.Household == null && Household.ActiveHousehold != null
        && !RealEstate.GetOwningHouseholds(sActiveBuildBuyLot.LotId).Contains(Household.ActiveHousehold)
        && (!GameObject.IsBuildBuyRestrictedForStageSetup() || LotManage.IsSettingUpStageForNPC(sActiveBuildBuyLot)))
    {
        LotManager.sFamilyFundsDisabled = true;
    }
    MagicWand.UnhideParkingSpots();
}


In that method, the code checks if the household is the owner of the lot through the method Awesome.Economy.RealEstate.GetOwningHouseholds(). Below is the original code:

public static List<Household> GetOwningHouseholds(ulong oid)
{
    List<Household> list = new List<Household>();
    foreach (Household sHousehold in Household.sHouseholdList)
    {
        if (sHousehold.RealEstateManager == null)
        {
            continue;
        }
        foreach (PropertyData allProperty in sHousehold.RealEstateManager.AllProperties)
        {
            bool flag = false;
            if (allProperty.IsFullOwner)
            {
                switch (allProperty.PropertyType)
                {
                case RealEstatePropertyType.VacationHome:
                case RealEstatePropertyType.Venue:
                case RealEstatePropertyType.Resort:
                    flag = allProperty.LotId == oid;
                    break;
                default:
                    flag = allProperty.ObjectId.Value == oid;
                    break;
                }
                if (flag && !list.Contains(sHousehold))
                {
                    list.Add(sHousehold);
                }
            }
        }
    }
    return list;
}


The code checks the ownership of the lot, however it disregards the PrivateLot property type

public enum RealEstatePropertyType
{
   None,
   RabbitHole,
   VacationHome,
   Venue,
   PrivateLot,
   Resort
}


Fix:
Adding the RealEstatePropertyType.PrivateLot to the switch cases fix the problem. The game no longer grants free build-buy on a purchased residential home in the homeworld. I modified the assembly via dnSpy tools and try to run in game.


2  Awesomeware / AwesomeMod! / Re: AwesomeMod Bug Report Thread on: 2016 December 30, 14:41:17
Checked the internal assembly on AwesomeMod and TS3, AM expect SimIFace module version E4365BD8-6054-4CB5-8702-C69B1C102CE9, while that patch level provides 3D0E30C5-DBFE-42F3-BE98-52248E3D39B9. Does this difference only on version number, even when AM is targetted on patch level 1.67?
OKay, see, that information is useful. I can add that in with the next update, although it will functionally be equivalent to just pressing the "ignore error" button.

Wow thank you, man. I was actually wondering if they implement somewhat different interface in that assembly, although they are in the same patch level.

But I think it might be unlikely as they might only rebuild the whole application for the Steam version while keeping the managed core library codes intact. This might be the reason why Steam and boxed release have different version minor as they are built separately as there are minor difference with Steam's executable, such as implementing the overlay. And (I believe) they rebuilt the source entirely including the managed codes resulting the assembly has different module version. Undecided

It is just that AM warning gives me uneasy feeling that I was using an incorrect installation for the mod lol. Grin

Cheers,
3  Awesomeware / AwesomeMod! / Re: AwesomeMod Bug Report Thread on: 2016 December 29, 13:35:13
Scroll up.

I'm sorry but I have been reading this thread and 3 pages behind and the core mismatch only happen when we update to 1.69, but in fact I am still in 1.67.  Undecided

EDIT:

Checked the internal assembly on AwesomeMod and TS3, AM expect SimIFace module version E4365BD8-6054-4CB5-8702-C69B1C102CE9, while that patch level provides 3D0E30C5-DBFE-42F3-BE98-52248E3D39B9. Does this difference only on version number, even when AM is targetted on patch level 1.67?
4  Awesomeware / AwesomeMod! / Re: AwesomeMod Bug Report Thread on: 2016 December 28, 15:08:16
Hey there. I just reinstalled my TS3 with Steam version, it is on version 1.67.2.024037. But AM shows warning Incompatible Core. I did not upgrade to 1.69 version at all and AM is the only mod currently on my folder. Wonder why?
5  Awesomeware / AwesomeMod! / Re: AWESOMEMOD & SCRIPT HACKS: CRASH ISSUES THREAD on: 2009 June 07, 16:24:42
Oh. So that might be the reason why when I deleted the userPreset.package, the game started. It was the second time I reloaded the game.  Cheesy

It must a suggestive feeling of me, lol.  Grin

I must admit that I agree that it must be magically done by the game code. The game code seems to be blinded for a while after the Shiny AwesomeMod comes. It might be too shiny for them.  Tongue
6  Awesomeware / AwesomeMod! / Re: AWESOMEMOD & SCRIPT HACKS: CRASH ISSUES THREAD on: 2009 June 07, 16:09:44
This is data is all very baffling and it seems like it is all voodoo. NONE of this should have any effect on the crashing, but for some reason performing seemingly random acts resolves the crashes?

I was having CTD problems on load until I deleted userPresets.package. What is this file?
That's where your CAS saved recolors are kept. There absolutely no logical reason why THAT would crash anything or stop crashing anything.

This entire business makes even less sense than Windoze does.

Well, apparently that method works for me. But every time this file is regenerated, the game cannot start again. So I need to deleted it again. But this means that we can't save any custom recolor/style.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.099 seconds with 19 queries.