PDA

View Full Version : Libcod2 Linux -> Win



randall
25th July 2015, 16:04
Hi guys!

I'd like to make a botmod with high AI, but for this i need some functions such as setAnim(), setStance(), player movement, firing, etc..
I could inject Mitch's dll and the basic functions worked fine, but when i tried to implement some functions from the forum i failed (yeah i know, lots of them for Kung's linux version).

And the question: Can someone give me a description, how can i use the linux functions in the windows libcod? (i read Mitch's tutorial (http://killtube.org/showthread.php?2083-Tutorial-How-to-create-your-own-libcod-function)) Sadly i never wrote c++ program before, when i will have some time, maybe i should :)

Thanks your helps!

Mitch
25th July 2015, 19:35
I don't think it is possible to port filthy_freak_'s player movement (http://killtube.org/showthread.php?2241-Player-movement-amp-grenades) functions to Windows.
The required function is a usercall and these calls are almost impossible to use.

CoD2 Windows 1.3.

hook_play_movement = new cHook(0x0456010, (int)play_movement);

const void *__usercall sub_456010<eax>(const void *result<eax>, int a2<ecx>)

I stopped working on libcod for Windows, because it has too many of these usercalls.

randall
25th July 2015, 21:05
Im sorry to hear that :( I want to forget the waypoint-based pathfinding and make navmesh but i cant without collision detecting. So it would be important to move the bots somehow, i dont like the meatbot's solution. Maybe i will try to freeze the controls and use the setVelocity(), but im not sure if it will work perfectly.
And what about the other functions?

filthy_freak_
25th July 2015, 21:57
Can't help you with Windows, but if you're trying to run a local server you can setup a ubuntu OS using VirtualBox and reconfig the local network so it will show on Windows.

randall
25th July 2015, 22:55
Well, if there is no way to run the complete libcod on win, i have to install an ubuntu :( But first i want to make the AI, maybe a simple barrel script_model will enough for it. Thanks both of you!

Mitch
26th July 2015, 09:44
Well, if there is no way to run the complete libcod on win, i have to install an ubuntu :( But first i want to make the AI, maybe a simple barrel script_model will enough for it. Thanks both of you!

Windows has support for setAlive. http://killtube.org/showthread.php?1938-Windows-SetAlive()-doubts
So you can test with shooting the AI.

IzNoGoD
26th July 2015, 18:40
randall check your pm s