Jump to content

Recommended Posts

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

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.

捕获.PNG

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 by FIXBUGFIXBUGFIX
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...