RimWorld

RimWorld

Auto Seller
Byter 21 Feb, 2019 @ 7:17am
Glitterworld Prime compatibility
Hello there!

I recently tried using Glitterworld Prime together with Auto Seller, and was promptly informed, that Auto Seller is injecting code in all types of trade windows, including Glitterworld Prime.
This causes errors and hard incompatibility.

Is there a compatible version planned or even possible? Would simply ignoring any Glitterworld Prime windows work as a workaround if no compatibility can be reached?


Have a great day on the rim! :Djoe:
< >
Showing 1-14 of 14 comments
Supes  [developer] 20 Mar, 2019 @ 5:12pm 
It sounds like you've been given bad information. as that does not sound like what my mod is doing at all.

Firstly AutoSeller doesn't inject by itself, it uses harmony, which is safer than injecting myself, it keeps track of patch chains etc. harmony is the best way to inject code, doesn't cause hard incompatibility, and is probably used by most of the c# mods you have installed (including Glitterworld Prime).

If someone decides to inject code by themselves without harmony, THIS can cause a hard incompatibility, THIS is something I would never do.

AutoSeller doesn't patch all derived trade windows, in fact it is very selective and only patches certain derived trade windows, every other derived trade window is left alone, unpatched.


I have Prime installed myself. and I know others that also use both with no issues.

Try running them together, go to the prime console and see if it works.


p.s. sorry, I didn't see this topic until now
Byter 21 Mar, 2019 @ 4:30am 
Originally posted by Supes:
p.s. sorry, I didn't see this topic until now

No problem. I have not played in a pretty long time now and did not really expect an answer.

But, thanks for clearing that up.

I do not have any other mods that change the trade windows or anything beside Auto Seller and Glitterworld. If I remember correctly, I could change values (buy/sell) stuff, but as soon as I clicked to confirm my order, only the silver amount on GWPs side went up/down and the window stayed open. Also the stuff I sold was gone. So I don't know what went wrong.

Also, here's the post I made on the GWP workshop: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/1515843333/1798529872637067672/

The thing is that both mods work perfectly with all my other mods independently, but not if both are loaded. :/
Supes  [developer] 21 Mar, 2019 @ 5:25am 
the link that showed the error log was handy.

I've made a small change to the trade code, my rules aren't causing errors either way atm so I cant really check if it helps or not. give it a test if you can please.
Byter 22 Mar, 2019 @ 10:53am 
Same situation. I opened GWP, all my rules where automatically applied (indicated by the amount of silver I'm about to receive). I click accept and this happens:
Exception filling window for Glitterworld_Prime.DialogPrimeTrade: System.NullReferenceException: Object reference not set to an instance of an object at Glitterworld_Prime.GlitterWorldOrderItem..ctor (Glitterworld_Prime.GlitterWorldItem,int,int) <0x0002c> at Glitterworld_Prime.TraderPrime.GiveSoldThingToPlayer (Verse.Thing,int,Verse.Pawn) <0x002f2> at RimWorld.Tradeable.<ResolveTrade>m__1 (Verse.Thing,int) <0x0005c> at RimWorld.TransferableUtility.TransferNoSplit (System.Collections.Generic.List`1<Verse.Thing>,int,System.Action`2<Verse.Thing, int>,bool,bool) <0x00118> at RimWorld.Tradeable.ResolveTrade () <0x0015d> at RimWorld.TradeDeal.TryExecute (bool&) <0x00338> at Glitterworld_Prime.DialogPrimeTrade.<DoWindowContents>b__16_3 () <0x0009e> at (wrapper dynamic-method) Glitterworld_Prime.DialogPrimeTrade.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x01075> at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x006a5> Verse.Log:Error(String, Boolean) Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32) UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

Again, the amount of silver on GWPs side goes down by the amount I would have received and the window stays open. Interestingly enough, my items are not gone this time.
Supes  [developer] 22 Mar, 2019 @ 7:31pm 
your items will still remain most likely because, the item it didn't like is the first item in the checkout. it stops there and doesn't do the rest of the list.

hopefully this update might fix it.
Last edited by Supes; 22 Mar, 2019 @ 8:27pm
Byter 23 Mar, 2019 @ 8:49am 
Tried the newest update:
Exception filling window for Glitterworld_Prime.DialogPrimeTrade: System.NullReferenceException: Object reference not set to an instance of an object at Glitterworld_Prime.GlitterWorldOrderItem..ctor (Glitterworld_Prime.GlitterWorldItem,int,int) <0x0002c> at Glitterworld_Prime.TraderPrime.GiveSoldThingToPlayer (Verse.Thing,int,Verse.Pawn) <0x002f2> at RimWorld.Tradeable.<ResolveTrade>m__1 (Verse.Thing,int) <0x0005c> at RimWorld.TransferableUtility.TransferNoSplit (System.Collections.Generic.List`1<Verse.Thing>,int,System.Action`2<Verse.Thing, int>,bool,bool) <0x00118> at RimWorld.Tradeable.ResolveTrade () <0x0015d> at RimWorld.TradeDeal.TryExecute (bool&) <0x00338> at Glitterworld_Prime.DialogPrimeTrade.<DoWindowContents>b__16_3 () <0x0009e> at (wrapper dynamic-method) Glitterworld_Prime.DialogPrimeTrade.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x01075> at Verse.Window/<WindowOnGUI>c__AnonStorey0.<>m__0 (int) <0x006a5> Verse.Log:Error(String, Boolean) Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32) UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

The problem with my modlist is, that IF it is another mod causing this, I can't go through all 160 of them and test them.

As I said, AutoSeller is one of the latest additions to my list and everything worked before. If I need to contact the GWP author again, I'll do that. :)
Supes  [developer] 23 Mar, 2019 @ 11:25am 
I would never ask anyone to go through 160 mods, I did however build some dev tools/setting into autoseller to help diagnose.

if you enable dev mode, go into mod settings, and in autoseller expert settings, you can turn on 'show report during patch'

this will create a letter just after the rules are applied, without requiring accept to be pressed. hopefully not too many items are on the letter and you can screenshot it please.

you can also disable the autoseller patch from here (and after restarting the game). be careful though, as these settings can disable autoseller completely (hence the big warning message at the top).
Byter 24 Mar, 2019 @ 8:39am 
https://ipfs.home.btr.zone/ipfs/QmXMEWxdUHP7TubXDcoLLJnLEkEsUE82JWAT9gVRn3sT67
(This image is hosted with IPFS and that link right there is a private gateway. It may load a bit slow.)
Obviously the same error when I click accept. But its not too much I'm trying to sell.

Interestingly enough, the error I had when I posted in the GWP thread, had about 200k worth of items instead of just 2277. No idea why its not detecting the items in the stockpile that you can see right there in the bottom left corner of the screenshot. Could it be, that the last update kind of screwed something up or so?

Hey listen if you need more help you can also just add me or something. Your profile is private so I don't want to be annoying haha.

EDIT: And I'm not quite sure if this is important, but I'm on Linux...

UPDATE: I disabled the dialog hook for GWP and it just worked. But my autoseller rules were still applied... Does it usually require a restart for these changes to take effect?
Last edited by Byter; 24 Mar, 2019 @ 11:09am
Supes  [developer] 24 Mar, 2019 @ 12:14pm 
interesting, the fact that it is all items your selling, I was expecting bought items. that has thrown me off my original plan of testing.

GiveSoldThingToPlayer usually refers to something bought (could be silver, as that is what I would expect is being given in exchange for sold items, I'll need to write another tool to double check though).

the update I made was to restrict to only apply rules to items where there was a price on the prime server, prime sets everything else at market value (without a factor) so I made it so market value items were skipped, in the hope that it would avoid picking possible unsupported items if that was the issue, though I think it isn't the issue now.

Linux should be fine.
Supes  [developer] 24 Mar, 2019 @ 12:16pm 
weird, disabling the hook without restart doesn't do anything extra. the hook settings are read when loading the game :)

lol, now I'm not sure of the silver theory.
Last edited by Supes; 24 Mar, 2019 @ 12:18pm
Byter 24 Mar, 2019 @ 12:31pm 
I don't think ignoring items would really help. As I said, instead of selling all my stuff it only auto selected a few items :( (which means I have to go through that long list manually and sell stuff like organs, which is exactly why I initially downloaded AutoSeller :P)

Whatever the case, I just played about 2 hours without problems, made about 5 trades. And as I said, everything worked after disabling the hook. No restart needed. Still most of my rules did not work because so many items were skipped (even though they're supported and you're allowed to sell them). Mostly organs if that helps.

EDIT: Question: Does disabling the hook do anything? The interface looked the same, it worked the same... virtually nothing changed except for it not throwing errors anymore and correctly selling my items.

EDIT2: I should probably mention, that most of the organs come from mods that add stuff like brains etc. I can't quite remember the name but if it's interesting for you, I'll look it up.
Last edited by Byter; 24 Mar, 2019 @ 12:34pm
Supes  [developer] 24 Mar, 2019 @ 12:47pm 
unchecking the hook saves the setting to a file, but isn't acted upon until the game is next restarted. so you still see the autosell quick create buttons and the rules are still applied, but it will all go when you restart rimworld.

so something else is happening I'm afraid. the conditions that lead to the error are not currently present.

I agree, the list of items prime has is massive, and would be great if we can get the autoseller rules working with prime. I will likely remove the restrictions from the last update, since you still had the error.

Edit: I noticed the foot wasn't vanilla, but I think they are safe imho.
Last edited by Supes; 24 Mar, 2019 @ 12:49pm
Byter 24 Mar, 2019 @ 12:49pm 
Also, I can now reproduce how not to get that error. Isn't that something?

1. Have everything enabled.
2. via dev mode disable the GWP hook
3. Profit!

If that somehow helps you narrow down the issue, it was at least worth trying :)

EDIT: Also, the above steps do not disable AutoSeller which is weird because when following them everything works as expected...
Last edited by Byter; 24 Mar, 2019 @ 12:50pm
Supes  [developer] 24 Mar, 2019 @ 12:50pm 
it all helps, thanks
< >
Showing 1-14 of 14 comments
Per page: 1530 50