AW: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Meta - 02.07.2012
um cool but I better wait for Alex009 to rerelease CNPC ^^
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
AIped - 02.07.2012
he wont continue his work
Re: AW: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
TheArcher - 02.07.2012
Quote:
Originally Posted by Meta
um cool but I better wait for Alex009 to rerelease CNPC ^^
|
We still speaking about memory hacking which is against the rules. CNPC could be released somewhere else but not on this forums as far as i know. And the addresses could change on any SAMP release so that's the hard part.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 02.07.2012
Quote:
Originally Posted by Babul
@Mauzen: <Removed: This is the English language section.>
|
<Removed: This is the English language section.>
@CNPC disucssion: CNPC is admittedly on an higher level than this. This plugin just makes use of the existing possibilities, while CNPC bypasses them and accesses the NPCs directly. The memory hacking was okay for the samp team, until it was used to fake the server player count. This shows that its easy to do illegal things as soon as you use memory hacking, thats why i dont wanna do it (and because i cant do it anyways
![Wink](images/smilies/wink.png)
)
@AIped: Im indeed not sure about this yet, but it might be possible. They can at least be put in cars using the normal samp functions. Syncing it nicely with animations would be the worst-case way to do it.
So, finished my work for today, time to continue with the plugin
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
TheArcher - 02.07.2012
Quote:
Originally Posted by Mauzen
So, finished my work for today, time to continue with the plugin ![Wink](images/smilies/wink.png)
|
The first feature i want to see is NPC in vehicles. (possible PutNPCInVehicle)
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 02.07.2012
Quote:
Originally Posted by TheArcher
The first feature i want to see is NPC in vehicles. (possible PutNPCInVehicle)
|
Working on this, but at first im gonna rewrite the generation code, else id have to rewrite it for both on-foot and vehicles afterwards
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
TheArcher - 02.07.2012
Quote:
Originally Posted by Mauzen
Working on this, but at first im gonna rewrite the generation code, else id have to rewrite it for both on-foot and vehicles afterwards ![Wink](images/smilies/wink.png)
|
Great news can't wait. I've already prepared everything for the release
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 02.07.2012
Quote:
Originally Posted by [HLF]Southclaw
Sweet Mother Of God
I can FINALLY get my zombie script back up and start coding some INTELLIGENCE
I love you, thank you for releasing this! ![Cheesy](images/smilies/biggrin.png)
|
Hehe, youre welcome
Reporting back from my current progress: I just finished rewriting the generation code. The code looks a lot nicer now (probably its still a nightmare for real c++ coders) and is about 4 times faster than the old one (some numbers - bare include: 53 calls/s, old code: 255, new code 1050). Never tested the speed before, but I thought it would be faster at all, however its realistically useable now
![Wink](images/smilies/wink.png)
With more optimisation the speed will probably go up a lot more.
So now I'll start adding vehicle support, and hope i can upload the next version today
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 02.07.2012
Hehe nice use of it.
Any NPC pros around? Maybe im just missing a stupid tiny thing.
I cant get my testnpc joining a vehicle, no matter what I try. PutPlayerInVehicle does nothing at all, neither in OnPlayerSpawn nor via a command. the npc remains unmoved, and OnNPCEnterVehicle is not called. Got to be some problem with the script. The npc script is almost unchanged since 0.1, the gamemode is an almost untouched lvdm.
Vehicle support is ready to be tested, but i cant test it that way.
Edit: The PutPlayerInVehicle even "bugs" the npc, afterwards he doesnt play back recordings at all and leaves the server. Seems like he would just enter the vehicle "a bit" so hes waiting for vehicle recordings, but is still on foot.
Edit2: He accepts vehicle recordings after PutPlayerInVehicle and plays them back. Hm I thought he would at least idle in the vehicle, no callbacks are called, IsPlayerInAnyVehicle is useless, so its really hard to determine if a npc is in "vehicle mode" or not.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
TheArcher - 02.07.2012
According with Southclaw, and i guess we had some ideas about our future plans and using the plugin, this could be a challenge
![Cheesy](images/smilies/biggrin.png)
, anyways i really needed PutPlayerInVehicle and IsPlayerInVehicle for NPCs, still waiting for future release.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Joe Staff - 02.07.2012
Perhaps setting the keys to the enter vehicle key would work.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 03.07.2012
Version 0.2 is ready!
It offers TONS of new possibilities, but unfortunately still only for OnFoot NPCs. You can now control every NPCs attribute (weapon, keys, specialactions, blablub). I tried to develop a easy system for creating the npc recordings, and hope i succeeded with it. As there are tons of new functions im setting up a wiki page for RNPC right now.
The download package now also contains a test filterscript, that allows assembling scripts via commands. Check its source for all the commands.
Ill add the new download link to the first posts in a second.
Heres a video demonstrating some of the possbilities using the filterscript:
[ame]http://www.youtube.com/watch?v=1arZzO34_3k[/ame]
Testing the onfoot quaternions i found out you can rotate the bot in a funny way, but you cant use them for aiming.
For the vehicle support im seemingly still missing some recfile details, as I cant build working vehicle recs at this moment. (Even the include and plugin contains functions for vehicles they do not work, they are just for my own tests and im too lazy to remove them for the release
![Wink](images/smilies/wink.png)
) Ill try my best to get it working soon.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
AIped - 03.07.2012
maybe its a stupid thought..maybe your missing it so did you actually used
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE,"yournpc"); ?
if its not used the recording will obviously only be played once
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 03.07.2012
Quote:
Originally Posted by AIped
maybe its a stupid thought..maybe your missing it so did you actually used
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE,"yournpc"); ?
if its not used the recording will obviously only be played once
|
Theres a function in the new version to toggle repeating
Edit: Heres the wiki page with all the infos and some example code:
https://sampwiki.blast.hk/wiki/Rnpc
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 03.07.2012
Thought the same, the only things thats missing is just synced aiming, too bad that it seems impossible with rec files.
I like working on this so much that im not even using it for my own scripts these days. I was waiting for something like this for ages
(I like this code I wrote for the wiki page, so Ill jsut repost it here as its the best possible tutorial
![Wink](images/smilies/wink.png)
)
pawn Code:
RNPC_CreateBuild(npcid, PLAYER_RECORDING_ONFOOT); // start build mode
RNPC_SetWeaponID(32); // Set weapon
RNPC_AddPause(500); // wait a bit
RNPC_AddMovement(0.0, 0.0, 0.0, 20.0, 20.0, 0.0); // start moving
RNPC_ConcatMovement(0.0, 20.0, 0.0); // Continue walking
RNPC_AddPause(200); // wait a bit again
RNPC_SetKeys(128); // aim straight forward
RNPC_AddPause(500);
RNPC_SetKeys(128 + 4); // Start shooting straight forward
RNPC_AddPause(500);
for (new i = 0; i < 360; i+=20) {
// Makes the NPC rotate slowly
RNPC_SetAngleQuats(0.0, i, 0.0);
RNPC_AddPause(150);
}
RNPC_SetKeys(128); // stop shooting
RNPC_AddPause(500);
RNPC_SetKeys(0); // stop aiming
RNPC_FinishBuild(); // end the build mode and finish the build
RNPC_StartBuildPlayback(npcid);
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Kar - 03.07.2012
if the bullet hits you do you get damaged?
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
TheArcher - 03.07.2012
Awesome update, going to try it soon.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
Mauzen - 03.07.2012
Quote:
Originally Posted by Kar
if the bullet hits you do you get damaged?
|
Yep, bullets deal their damage. I think also OnPlayerTakeDamage should work, as NPCs are synced like any normal player.
Re: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
vyper - 03.07.2012
Great plugin
![Smiley](images/smilies/smile.png)
keep it alive
AW: RNPC - Recordfree NPCs | Control NPCs without recording | DEV -
BloodyEric - 03.07.2012
The video looks awesome!
Although I realized that the NPC is floating a little over the ground before actually beginning to walk - is this fixable? Maybe applying the animation before setting the movement?
Apart from that its really great, I hope you can do some car-stuff too.