IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How do you find out what the mstr_offset is?
Cinibonswirl26
post Feb 28 2017, 02:24 PM
Post #1


Member
**

Group: Members
Posts: 24
Joined: 21-January 16
From: U.S.A
Member No.: 2,441



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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dgesd
post Mar 1 2017, 08:54 AM
Post #2


Member
**

Group: Members
Posts: 43
Joined: 23-February 14
From: Russia
Member No.: 2,325



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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cinibonswirl26
post Mar 1 2017, 10:18 PM
Post #3


Member
**

Group: Members
Posts: 24
Joined: 21-January 16
From: U.S.A
Member No.: 2,441



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Mar 2 2017, 08:38 AM
Post #4


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



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....;hl=mstr_offset
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cinibonswirl26
post Mar 2 2017, 02:42 PM
Post #5


Member
**

Group: Members
Posts: 24
Joined: 21-January 16
From: U.S.A
Member No.: 2,441



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....;hl=mstr_offset


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

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Mar 3 2017, 08:27 AM
Post #6


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cinibonswirl26
post Mar 3 2017, 11:39 PM
Post #7


Member
**

Group: Members
Posts: 24
Joined: 21-January 16
From: U.S.A
Member No.: 2,441



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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cinibonswirl26
post Apr 6 2017, 01:32 AM
Post #8


Member
**

Group: Members
Posts: 24
Joined: 21-January 16
From: U.S.A
Member No.: 2,441



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Apr 6 2017, 07:37 AM
Post #9


Admin
*****

Group: Admin
Posts: 3,066
Joined: 11-September 03
From: uk
Member No.: 1



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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cinibonswirl26
post Apr 6 2017, 03:24 PM
Post #10


Member
**

Group: Members
Posts: 24
Joined: 21-January 16
From: U.S.A
Member No.: 2,441



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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
RoboCop
post Mar 19 2018, 10:54 PM
Post #11


RCBot Fan
****

Group: Admin
Posts: 192
Joined: 17-December 15
From: Dundee, Scotland
Member No.: 2,435



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
nosoop
post Jul 21 2019, 04:19 PM
Post #12


Newbie
*

Group: Members
Posts: 6
Joined: 21-July 19
Member No.: 2,601



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:
  • func_ladderendpoint
  • func_illusionary
  • simple_physics_brush
  • env_movieexplosion
  • trigger_transition
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
nosoop
post May 22 2020, 05:29 AM
Post #13


Newbie
*

Group: Members
Posts: 6
Joined: 21-July 19
Member No.: 2,601



Consider this problem solved!

I've pushed out this commit onto my custom fork, which pulls the offset automatically based on the size of one of the entities I mentioned above.
You may also need this commit to use the upstream IServerTools interface; not sure if the one that was in the project works.

Confirmed working on both Linux and Windows versions of TF2. If you're an end-user, wait for it to be merged into RoboCop's upstream.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
trice
post Nov 1 2021, 06:25 PM
Post #14


Member
**

Group: Members
Posts: 15
Joined: 25-February 18
Member No.: 2,533



Hello,

i used this at Linux Ubuntu Gameroot

rcbot_const_mstr_offset 876
rcbot_const_round_offset 876
rcbot_tooltips 0
rcbot tooltips 0

QUOTE
hookinfo.ini
givenameditem_win=478
givenameditem_linux=479
equipwearable_win=426
equipwearable_linux=427
runplayermove_tf2_win=418
runplayermove_tf2_linux=419
runplayermove_dods_win=418
runplayermove_dods_linux=419
getweaponslot_win=268
getweaponslot_linux=269
removewearable_win=427
removewearable_linux=428
removeplayeritem_win=270
removeplayeritem_linux=271
weaponequip_win=261
weaponequip_linux=262
mstr_offset_win=844
mstr_offset_linux=864
gamerules_win=5
getdatadescmap_linux=12
create_gamerules_object_win=\x55\x8B\xEC\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x07
set_attribute_value_win=\x55\x8B\xEC\x83\xEC\x14\x33\xD2\x53\x8B\xD9\x56\x57\x8B\x73\x10\x85\xF6
set_attribute_value_linux=@_ZN14CAttributeList24SetRuntimeAttributeValueEPK28CEc
onItemAttributeDefinitionf
get_item_schema_win=\xE8\x2A\x2A\x2A\x2A\x83\xC0\x04\xC3
get_item_schema_linux=@_Z15GEconItemSchemav
get_attrib_definition_win=\x55\x8B\xEC\x83\xEC\x1C\x53\x8B\xD9\x8B\x0D\x2A\x2A\x2A\x2A\x56\x33\xF6\x89\x5D\xF8\x89\x75\xE4\x89\x75\xE8
get_attrib_definition_linux=@_ZN15CEconItemSchema22GetAttributeDefinitionEi
attributelist_get_attrib_by_id_win=\x55\x8B\xEC\x51\x8B\xC1\x53\x56\x33\xF6\x89\x45\xFC\x8B\x58\x10
attributelist_get_attrib_by_id_linux=@_ZNK14CAttributeList16GetAttributeByIDEi
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
13 User(s) are reading this topic (13 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 31st October 2024 - 02:56 PM