noodle run Posted September 22, 2025 Share Posted September 22, 2025 I found some code by Sim.HandleMessage function, but i don't know how to use these. public enum SimMessageHashes { SimData_FreeCells, AllocateCells, SimData_ResizeAndInitializeVacuumCells, ...... } I found these code in "SimMessageHashes.cs" file. I want to change the number of cells. These "message" seem to be consistent with my thoughts from the literal meaning. Can someone guide me on this? thx Link to comment https://forums.kleientertainment.com/forums/topic/168137-how-to-use-simhandlemessage/ Share on other sites More sharing options...
FIXBUGFIXBUGFIX Posted September 23, 2025 Share Posted September 23, 2025 What do you mean "change the number of cells" ? The number of cells (grids) is determined by world size. You can't change it after the world has been created. Link to comment https://forums.kleientertainment.com/forums/topic/168137-how-to-use-simhandlemessage/#findComment-1837010 Share on other sites More sharing options...
noodle run Posted September 23, 2025 Author Share Posted September 23, 2025 6 hours ago, FIXBUGFIXBUGFIX said: What do you mean "change the number of cells" ? The number of cells (grids) is determined by world size. You can't change it after the world has been created. hello FIXBUGFIXBUGFIX. i think the "cells" just a memory block, it should can be modifiable. I read the decompiled code of "Assembly-CSharp" and "simDLL.dll", I found that the memory of "grid" is stored in two different memory blocks "Assembly-CSharp" and "simDLL.dll". The code for handling messages in the "simDLL.dll" library ("SimMessageHashes.cs") appears to allow modification of the number of cells. But the problem is that I don't have any documentation for the code, so I don't know how to use it. The image below shows the decompiled code of the simDLL, which uses the "new" operator for memory allocation. Link to comment https://forums.kleientertainment.com/forums/topic/168137-how-to-use-simhandlemessage/#findComment-1837061 Share on other sites More sharing options...
FIXBUGFIXBUGFIX Posted September 23, 2025 Share Posted September 23, 2025 (edited) Unfortunately, there is no way to modify the cell count of an initialized simDLL. But certainly, you can determine how many cell should be initialized in an uninitialized simDLL. You can achieve it by the following sequences: call SIM_Shutdown initialize a anew simDLL Prepare a modified initialization data and call SimDataInitializeFromCells Edited September 23, 2025 by FIXBUGFIXBUGFIX Link to comment https://forums.kleientertainment.com/forums/topic/168137-how-to-use-simhandlemessage/#findComment-1837097 Share on other sites More sharing options...
noodle run Posted September 24, 2025 Author Share Posted September 24, 2025 19 hours ago, FIXBUGFIXBUGFIX said: Unfortunately, there is no way to modify the cell count of an initialized simDLL. But certainly, you can determine how many cell should be initialized in an uninitialized simDLL. You can achieve it by the following sequences: call SIM_Shutdown initialize a anew simDLL Prepare a modified initialization data and call SimDataInitializeFromCells thx for your answer Link to comment https://forums.kleientertainment.com/forums/topic/168137-how-to-use-simhandlemessage/#findComment-1837195 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now