Printable Version of Topic

Click here to view this topic in its original format

RCBot Forums _ Linux _ How do you find out what the mstr_offset is?

Posted by: Cinibonswirl26 Feb 28 2017, 02:24 PM

The bot only works on CTF maps and if I load any other game time it crashes and give me an error saying
"If you get this error message on cp_* maps something might be wrong with your mstr_offset

Posted by: dgesd Mar 1 2017, 08:54 AM

QUOTE(Cinibonswirl26 @ Feb 28 2017, 02:24 PM) *

The bot only works on CTF maps and if I load any other game time it crashes and give me an error saying
"If you get this error message on cp_* maps something might be wrong with your mstr_offset

Try to put these to config.ini

CODE
rcbot_const_mstr_offset 856
rcbot_const_round_offset 856

Posted by: Cinibonswirl26 Mar 1 2017, 10:18 PM

QUOTE(dgesd @ Mar 1 2017, 12:54 AM) *

Try to put these to config.ini

CODE
rcbot_const_mstr_offset 856
rcbot_const_round_offset 856



Didn't work sad.gif

I forgot to mention that it only crashes once someone joins a team and picks a class.
It does not crash when you choose spectator.

Posted by: Cheeseh Mar 2 2017, 08:38 AM

there was a whole developer discussion about it but nothing ever came out of it. I might try introducing a method like this eventually.

http://rcbot.bots-united.com/forums/index.php?showtopic=1981&hl=mstr_offset

Posted by: Cinibonswirl26 Mar 2 2017, 02:42 PM

QUOTE(Cheeseh @ Mar 2 2017, 12:38 AM) *

there was a whole developer discussion about it but nothing ever came out of it. I might try introducing a method like this eventually.

http://rcbot.bots-united.com/forums/index.php?showtopic=1981&hl=mstr_offset


Weird that the Linux version crashes due to not having the right mstr_offsrt whereas the Windows version runs fine.


Posted by: Cheeseh Mar 3 2017, 08:27 AM

QUOTE(Cinibonswirl26 @ Mar 2 2017, 02:42 PM) *

Weird that the Linux version crashes due to not having the right mstr_offsrt whereas the Windows version runs fine.


it will be different from windows perhaps by multiples of 4. (add or remove 4 to it) try a few more times

Posted by: Cinibonswirl26 Mar 3 2017, 11:39 PM

QUOTE(Cheeseh @ Mar 3 2017, 12:27 AM) *

it will be different from windows perhaps by multiples of 4. (add or remove 4 to it) try a few more times


Looks like 876 is the new Linux offset! Thanks Chesseh smile.gif smile.gif smile.gif

Only other problem is I still can't get them to spawn with custom loadouts even with the right hook info from the .exe

If the mstr_offset was slightly off a number or two, do you think that might be the cause of it? It will print all the "Found Loadout" stuff in the console

Posted by: Cinibonswirl26 Apr 6 2017, 01:32 AM

Using the sourcemod plugin Give Bots Weapons works just fine. Strange considering it's using the exact same offset number as the latest hookinfo off of the exe.

Posted by: Cheeseh Apr 6 2017, 07:37 AM

QUOTE(Cinibonswirl26 @ Mar 4 2017, 12:39 AM) *

Looks like 876 is the new Linux offset! Thanks Chesseh smile.gif smile.gif smile.gif

Only other problem is I still can't get them to spawn with custom loadouts even with the right hook info from the .exe

If the mstr_offset was slightly off a number or two, do you think that might be the cause of it? It will print all the "Found Loadout" stuff in the console

The mstr_offset stuff is only for control point maps. Because its Linux I don't know if the offsets are correct

Posted by: Cinibonswirl26 Apr 6 2017, 03:24 PM

QUOTE(Cheeseh @ Apr 6 2017, 12:37 AM) *

The mstr_offset stuff is only for control point maps. Because its Linux I don't know if the offsets are correct


Ah. Okay. I'm just saying I find it odd due to how the sourcemod plugin Give Bots Weapons uses the exact same offsets on Linux and gives the bots weapons, whereas it wont using the normal RCbot method

Posted by: RoboCop Mar 19 2018, 10:54 PM

Well it is very annoying on finding the correct new offsets for Linux I admit. I'm not sure how to resolve that or find a better away to find the new Linux offsets in the future.

Posted by: nosoop Jul 21 2019, 04:19 PM

For manual lookups, you can use the dump_entity_sizes command on their respective platform and look for entities that don't add members to CBaseEntity.

The following entities are the ones I noted down: