sjaak327 1,047 Posted July 7, 2014 Share Posted July 7, 2014 (edited) nicer does not mean better I'm talking specifically about interacting with GTAIV engine using the c++ hook only or interacting through the .net scripthook. The .Net hook DOES in fact make the scripters job easier and to me that is better. I'm not talking which language is better as we all know c++ has it's advantages and .Net has its advantages. Just talking about working with the 2 hooks available. Not to mention the .Net hook allows me to reload scripts I'm working on in game. I love being able to Alt-Tab to VS, change code... compile with a post build event to install the dll and alt-Tab back into game within a few seconds. This is all a matter of how things were designed and the .Net hook is so much nicer. Aru's hook also has the ability to reload on the fly. I prefer the c++ hook over a.net precisely because it allows for more freedom, including the ability to call natives by hash. And it doesn't add another dependency just because it is easier to use, easy doesn't mean it is better. what freedom do u gain i wonder? how do u reload asi scripts then? plus i like c#... it really depends on what u like to code in The .net hook didn't call game natives directly (even though you could call them directly) and had many things preconfigured. Yes that is indeed easier to use but makes customization harder to achieve. The scripthook came with a development loader in which any asi/dll that was loaded could be unloaded and reloaded. Including the .net scripthook by the way. Which is another downside I mentioned before, it is another layer. Edited July 7, 2014 by sjaak327 PacketOverload_x64bit 1 Link to post Share on other sites
Noox 73 Posted July 7, 2014 Share Posted July 7, 2014 I like c++ because in c++ we can recreate original game scripts and ingame there were many amazing things and also connected animations like the man stealing bicycle from the women in bus assasination mission etc. i was looking at the scripts and i began to understand. THe big problem is there are thousands of useless lines in the file all are + - + 0xc bit and strange things These are not useless lines... 0x means you're writing a hex code. Link to post Share on other sites
byteMe420 64 Posted July 7, 2014 Share Posted July 7, 2014 (edited) nicer does not mean better I'm talking specifically about interacting with GTAIV engine using the c++ hook only or interacting through the .net scripthook. The .Net hook DOES in fact make the scripters job easier and to me that is better. I'm not talking which language is better as we all know c++ has it's advantages and .Net has its advantages. Just talking about working with the 2 hooks available. Not to mention the .Net hook allows me to reload scripts I'm working on in game. I love being able to Alt-Tab to VS, change code... compile with a post build event to install the dll and alt-Tab back into game within a few seconds. This is all a matter of how things were designed and the .Net hook is so much nicer. Aru's hook also has the ability to reload on the fly. I prefer the c++ hook over a.net precisely because it allows for more freedom, including the ability to call natives by hash. And it doesn't add another dependency just because it is easier to use, easy doesn't mean it is better. what freedom do u gain i wonder? how do u reload asi scripts then? plus i like c#... it really depends on what u like to code in The .net hook didn't call game natives directly (even though you could call them directly) and had many things preconfigured. Yes that is indeed easier to use but makes customization harder to achieve. The scripthook came with a development loader in which any asi/dll that was loaded could be unloaded and reloaded. Including the .net scripthook by the way. Which is another downside I mentioned before, it is another layer. i see your point but i dont see the issue with another layer or an extra dependency with modding this game. Everything in the pc uses some api or dependency. I dont think we can notice the extra calls unless u run some tests but i believe it isnt significant so u go with what is easier to write instead of what may loop faster. I do get your point of customization but you can still do that in .net as u dont have to use the wrapped code. I actually check the source to see how the wrapped code works and i use or change when appropriate. I don't mean to get into a which hook is better debate because in the end it depends on which hook will allow u to accomplish your goal in a simple way. The .net hook wrapped code does have some nice helper code. Also didnt realize u could unload.load asi scripts edit: i also forgot to mention about yeah .net has to use JIT compiling but is this really a performance killer for gta? i have written asi scripts and then made the exact same script in .net and they behave the same Edited July 9, 2014 by byteMe420 PacketOverload_x64bit 1 Link to post Share on other sites
GooD-NTS 2,110 Posted July 8, 2014 Share Posted July 8, 2014 I'd prefer to have native scripting through #sc editing than any of external hooks. Frank.s, Silent, Link2012 and 1 other 4 Link to post Share on other sites
NTAuthority 2,580 Posted July 8, 2014 Share Posted July 8, 2014 I'd prefer to have native scripting through #sc editing than any of external hooks.Native scripts lack debugger support and any development assistance whatsoever without completely changing the interpreter. Link to post Share on other sites
unknown modder 202 Posted July 8, 2014 Share Posted July 8, 2014 I'd prefer to have native scripting through #sc editing than any of external hooks. Agreed, much simpler and dont have to worry about any issues from those external hooks. I know people trying to get RPC working for ps3 are having trouble calling certain natives due to the function they are hooking into. Link to post Share on other sites
Deji 815 Posted July 8, 2014 Share Posted July 8, 2014 (edited) Well, I'd prefer to, this time, completely skip all the documenting, researching and pain of most of this "native" stuff and just dive straight into my current idea of doing everything in a more custom/new way which is actually made to be modded instead of hacking something which isn't until we can use it. To me, our weakness has always been how long and tiring the fight to understand Norths custom formats, instead of doing the harder (at first) job of diving straight into the executable and hooking our own formats into it instead, which we'll have full control over, and actually understand. Edited July 8, 2014 by Deji Link to post Share on other sites
unknown modder 202 Posted July 8, 2014 Share Posted July 8, 2014 Well, I'd prefer to, this time, completely skip all the documenting, researching and pain of most of this "native" stuff and just dive straight into my current idea of doing everything in a more custom/new way which is actually made to be modded instead of hacking something which isn't until we can use it. To me, our weakness has always been how long and tiring the fight to understand Norths custom formats, instead of doing the harder (at first) job of diving straight into the executable and hooking our own formats into it instead, which we'll have full control over, and actually understand. the executable tells us pretty much everything we need to know about the games file formats, its just the case of finding it. the only unknowns about the script files are really all native documentation and global variable documentation. Things like knowing Global_2097152 is the array(of only 1 item for some reason) that stores all info relating to things like your garage cars and mp property Link to post Share on other sites
Deji 815 Posted July 8, 2014 Share Posted July 8, 2014 Well, I'd prefer to, this time, completely skip all the documenting, researching and pain of most of this "native" stuff and just dive straight into my current idea of doing everything in a more custom/new way which is actually made to be modded instead of hacking something which isn't until we can use it. To me, our weakness has always been how long and tiring the fight to understand Norths custom formats, instead of doing the harder (at first) job of diving straight into the executable and hooking our own formats into it instead, which we'll have full control over, and actually understand. the executable tells us pretty much everything we need to know about the games file formats, its just the case of finding it. the only unknowns about the script files are really all native documentation and global variable documentation.Things like knowing Global_2097152 is the array(of only 1 item for some reason) that stores all info relating to things like your garage cars and mp property Meh, not looked into that side of things yet. I'm still fully focused on working on completely separate things, which CAN be implemented on V when the proper time comes, or any other game for that matter. With the games file formats, we can only do the things they're made for. With a good enough understanding of the executable, we can do anything. All we have to do is work on our own formats and tools, then find a way to implement them. Cracking formats is the easier, and possibly quicker of the two options at first, but to have our own open-source tools and formats which can be adapted to all the GTA games is my current stance. I'm all for cracking North's formats, mostly just because I'm interested in their development processes, but I reckon infinite power can only be gained by doing something a lot more independent. Alexander 1 Link to post Share on other sites
NTAuthority 2,580 Posted July 8, 2014 Share Posted July 8, 2014 I'd prefer to have native scripting through #sc editing than any of external hooks. Agreed, much simpler and dont have to worry about any issues from those external hooks. I know people trying to get RPC working for ps3 are having trouble calling certain natives due to the function they are hooking into. ... that's just a case of the 'current thread' variable being unset, at least assuming 'certain natives' include model requesting and whatnot. Link to post Share on other sites
sjaak327 1,047 Posted July 8, 2014 Share Posted July 8, 2014 I'd prefer to have native scripting through #sc editing than any of external hooks. The problem with that is that it requires users to edit the scripts.rpf. At the time the hooks for IV were released, there wasn't even an option to edit game scripts directly. I personally use win32 API calls for some of my stuff (apart from the game natives, and using VS and compile is preferred over editing the scripts directly imho. Link to post Share on other sites
Deji 815 Posted July 8, 2014 Share Posted July 8, 2014 By the way, does anyone have any plans for inevitable .exe patches? There's obviously gonna be loads of them and they will screw our progress up with each update. Link to post Share on other sites
NTAuthority 2,580 Posted July 9, 2014 Share Posted July 9, 2014 By the way, does anyone have any plans for inevitable .exe patches? There's obviously gonna be loads of them and they will screw our progress up with each update.pattern-based matching of code Link to post Share on other sites
Alexander Blade 1,424 Posted July 9, 2014 Author Share Posted July 9, 2014 (edited) Quite a discussion you have here , I guess you guys forgot that script editing usually means 1. Decompiler -> Compiler (a lot of stuff to do in order to make code compilable) , not talking about tools which force user to deal with low level 2. Rpf editing each time you change the script - this is not user friendly at all 3. Possibility to break game saves (it's harder than it was for IV but still) 4. As was mentioned above - requires custom debugger writing 5. You will definitely need to write custom natives in order to extend functionality 6. ????? 7. PROFIT It is 7 : 1 unknown modder Everything works fine when you are doing it the way game does Deji The simplest way is actually the one with editing resources as they are (like it is in openFormats) , resource is a game class memory dump , which is being directly mapped into the game's class instance , it's not possible to change internal stuff like this without rewriting rage from scratch Unification is definitely good but only when it's not being overcomed by per-resource unique features . Edited July 9, 2014 by Alexander Blade Link to post Share on other sites
unknown modder 202 Posted July 9, 2014 Share Posted July 9, 2014 Quite a discussion you have here , I guess you guys forgot that script editing usually means 1. Decompiler -> Compiler (a lot of stuff to do in order to make code compilable) , not talking about tools which force user to deal with low level 2. Rpf editing each time you change the script - this is not user friendly at all 3. Possibility to break game saves (it's harder than it was for IV but still) 4. As was mentioned above - requires custom debugger writing 5. You will definitely need to write custom natives in order to extend functionality 6. ????? 7. PROFIT It is 7 : 1 unknown modder Everything works fine when you are doing it the way game does If you know how to use the low level its still pretty easy to write fairly advanced scripts with it. You have seen the things me and toothpik(and a few others) have made just creating scripts in low level. Link to post Share on other sites
Alexander Blade 1,424 Posted July 12, 2014 Author Share Posted July 12, 2014 (edited) Well low level is a low level , no more no less , thats why Write in C Edited July 12, 2014 by Alexander Blade SNIT01, BioBrain, unknown modder and 5 others 8 Link to post Share on other sites
julionib 252 Posted July 12, 2014 Share Posted July 12, 2014 /\ lol Link to post Share on other sites
TemporaryAccount7 1 Posted July 22, 2014 Share Posted July 22, 2014 (edited) Write in C not VB. If Julio Writes in C he will make scripts better than the ones of rockstar. Julio is the best gta coder. even better than Aaron Garbut, Adam Fowler, Adam Cochrane, The Benz and everyone Edited July 22, 2014 by TemporaryAccount7 Link to post Share on other sites
Anas12 0 Posted July 23, 2014 Share Posted July 23, 2014 guys I new here, can you plz tell which software language should I use to code GTA V Link to post Share on other sites
Alexander Blade 1,424 Posted July 23, 2014 Author Share Posted July 23, 2014 guys I new here, can you plz tell which software language should I use to code GTA V You can't code for GTA V til PC release pogo_01 1 Link to post Share on other sites
byteMe420 64 Posted July 28, 2014 Share Posted July 28, 2014 (edited) guys I new here, can you plz tell which software language should I use to code GTA V You can't code for GTA V til PC release Well when released, I imagine it will be setup for C++ like the previous scripthook. I know a V .net hook is planned as well. Edited July 28, 2014 by byteMe420 Link to post Share on other sites
Alvarez 8,412 Posted July 28, 2014 Share Posted July 28, 2014 So, learn C++ to start understanding the code and later change to easier script languages is the key, huh? Angel Script, Lua and C++ novice here. Link to post Share on other sites
XeClutch 33 Posted July 29, 2014 Share Posted July 29, 2014 I knew you guys had something good in store for everyone, nice topic and research! Fixes on your list: Was: Any _0x499747B6(Any p0); // 0x499747B6Now: char *GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(Vehicle veh); // 0x499747B6 Was: Any NET_BUT(); // 0x6970BA94Now: bool NETWORK_IS_HOST_OF_THIS_SCRIPT(); // 0x6970BA94 My edits to the list (parameters, returns..ect..) Namespace Vehicle: void SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(Vehicle veh, int r, int g, int b); // 0x8DF9F9BCvoid GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(Vehicle veh, int *r , int *g, int *b); // 0x1C2B9FEFvoid CLEAR_VEHICLE_CUSTOM_PRIMARY_COLOUR(Vehicle veh); // 0x51E1E33D Vehicle CREATE_VEHICLE(uint vehicleHash, float X, float Y, floayt Z, float heading, bool unk1, bool unk2); // 0xDD75460Avoid DELETE_VEHICLE(Vehicle *veh); // 0x9803AF60 void SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(Vehicle veh, int r, int g, int b); // 0x9D77259Evoid GET_VEHICLE_CUSTOM_SECONDARY_COLOUR(Vehicle veh, int *r, int *g, int *b); // 0x3FF247A2void CLEAR_VEHICLE_CUSTOM_SECONDARY_COLOUR(Vehicle veh); // 0x7CE00B29 void SET_VEHICLE_NUMBER_PLATE_TEXT(Vehicle veh, char* plateText); // 0x400F9556char* GET_VEHICLE_NUMBER_PLATE_TEXT(Vehicle veh); // 0xE8522D58void SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(Vehicle veh, int plateindex); // 0xA1A1890E bool IS_VEHICLE_ATTACHED_TO_TRAILER(Vehicle veh); // 0xE142BBCCbool IS_VEHICLE_ON_ALL_WHEELS(Vehicle veh); // 0x10089F8Evoid SET_VEHICLE_SIREN(Vehicle veh, bool sirenOn); // 0x4AC1EFC7bool IS_VEHICLE_SIREN_ON(Vehicle veh); // 0x25EB5873bool IS_VEHICLE_SEAT_FREE(Vehicle veh, int seatIndex); // 0xDAF42B02 Namespace Player char *GET_PLAYER_NAME(Player player); bool IS_PLAYER_TARGETTING_ANYTHING(Player player); // 0x456DB50Dbool IS_PLAYER_FREE_AIMING(Player player); // 0x1DEC67B7bool IS_PLAYER_FREE_AIMING_AT_ENTITY(Player player, Entity e); // 0x7D80EEAAbool IS_PLAYER_DEAD(Player player); // 0x140CA5A8bool IS_PLAYER_PLAYING(Player p); // 0xE15D777F int GET_MAX_WANTED_LEVEL(); // 0x457F1E44 Namespace Entity uint GET_ENTITY_MODEL(Entity e); // 0xDAFCB3ECint GET_ENTITY_HEIGHT_ABOVE_GROUND(Entity e); // 0x57F56A4Dbool IS_ENTITY_A_PED(Entity e); // 0x55D33EABbool IS_ENTITY_A_MISSION_ENTITY(entity e); // 0x2632E124bool IS_ENTITY_A_VEHICLE(Entity e); // 0xBE800B01bool IS_ENTITY_AN_OBJECT(Entity e); // 0x3F52E561 void ATTACH_ENTITY_TO_ENTITY(Entity attachEntity, Entity targetentity, int unk1, float relativeXCoord, float relativeYCoord, float relativeZCoord, float relativeXRotation, float relativeYRotation, float relativeZRotation , int unk2, int unk3, int unk4, int unk5, int unk6, int unk7); // 0xEC024237 void DELETE_ENTITY(Entity *e); // 0xFAA3D236void DETACH_ENTITY(Entity e, int unk1, int unk2); // 0xC8EFCB41void FREEZE_ENTITY_POSITION(Entity e, bool freeze); // 0x65C16D57void SET_ENTITY_ROTATION(Entity e, float rX, float rY, float rZ, int unk1, int unk2); // 0x0A345EFEvoid SET_ENTITY_VISIBLE(Entity e, bool visible); // 0xD043E8E1bool IS_ENTITY_VISIBLE(Entity e); // 0x120B4ED5 Namespace Ped bool IS_PED_A_PLAYER(Ped p); // 0x404794CA Vehicle veh GET_VEHICLE_PED_IS_IN(Ped p, int unk); // 0xAFE92319bool IS_PED_IN_ANY_VEHICLE(Ped p, int unk1); // 0x3B0171EE Namespace Gameplay void SET_BIT(int* location, int bt); // 0x4EFE7E6Bvoid CLEAR_BIT(int* location, int bit); // 0x8BC9E618bool IS_BIT_SET(int location, int bit); // 0x902E26AC void SET_TIME_SCALE(char* timeScaleName); // 0xA7F84694 bool IS_STRING_NULL(char* location); // 0x8E71E00Fbool IS_STRING_NULL_OR_EMPTY(char* location); // 0x42E9F2CA uint GET_GAME_TIMER(); // 0xA4EA0691uint GET_FRAME_TIME(); // 0x96374262uint GET_FRAME_COUNT(); // 0xB477A015 int GET_RANDOM_FLOAT_IN_RANGE(int min, int max); // 0x0562C4D0float GET_RANDOM_INT_IN_RANGE(float min, float max); // 0x4051115B void DISPLAY_ONSCREEN_KEYBOARD(int language, char *gxtName, char *unk1, char *defaultText, char *unk2, char* unk3, char* unk4, int maxMessageLen); // 0xAD99F2CEint UPDATE_ONSCREEN_KEYBOARD(); // 0x23D0A1CEchar *GET_ONSCREEN_KEYBOARD_RESULT(); // 0x44828FB3 I meant to reply earlier but SET_TIME_SCALE is wrong. If you look at the function it edits a float. Here you see it being called with a float. I use this and it works fine: void SET_TIME_SCALE(float timeScale); Skorpro 1 Link to post Share on other sites
Alexander Blade 1,424 Posted July 30, 2014 Author Share Posted July 30, 2014 (edited) When gtamodding wiki will work I'll add my current c++ header with native declarations , so before every change you post here you will make it in the wiki , currently login doesn't work there Edited July 30, 2014 by Alexander Blade XeClutch, XBLToothPik and Aleph-Zero 3 Link to post Share on other sites
casscode 0 Posted July 31, 2014 Share Posted July 31, 2014 (edited) i firstly would like to thank all the devs that make scripting for gta possible. then a question. instead of creating a wrapper for the .net framework. why not use the more accessible languages(by accessible, i mean that one does not have to install a large framework for the runtime) like d or rust, or even use luajit this time around. plus eventually the game will be playable on *nix through wine, and using the scripthook.net bindings on wine is not easy Edited July 31, 2014 by casscode Link to post Share on other sites
Alexander Blade 1,424 Posted July 31, 2014 Author Share Posted July 31, 2014 plus eventually the game will be playable on *nix through wine Yeeeees , wiiiiiiiine , GTA V probably won't support dx9 at all Sergiu 1 Link to post Share on other sites
casscode 0 Posted July 31, 2014 Share Posted July 31, 2014 plus eventually the game will be playable on *nix through wine Yeeeees , wiiiiiiiine , GTA V probably won't support dx9 at all yes, but wine may eventually support dx10/11 Link to post Share on other sites
Alexander Blade 1,424 Posted July 31, 2014 Author Share Posted July 31, 2014 gta iv under wine still runs on 5fps using good hardware , the only way to play it on wine was to use gallium-nine drivers with patched wine the only reason ppl used .net scripthook is cuz it was easy to use classes with msvs ide integration Link to post Share on other sites
WhiteHulk 0 Posted July 31, 2014 Share Posted July 31, 2014 My mind is basicle blown Link to post Share on other sites
Aleph-Zero 1,257 Posted August 1, 2014 Share Posted August 1, 2014 i firstly would like to thank all the devs that make scripting for gta possible. then a question. instead of creating a wrapper for the .net framework. why not use the more accessible languages(by accessible, i mean that one does not have to install a large framework for the runtime) like d or rust, or even use luajit this time around. plus eventually the game will be playable on *nix through wine, and using the scripthook.net bindings on wine is not easy "why not use the more accessible languages(by accessible, i mean that one does not have to install a large framework for the runtime)" Every windows machine capable of running GTA V comes with .net framework installed. Also .Net just blows everything else out of the water imo (in ease of use and libraries). So much stuff you don't have to worry about, you just need to worry about what your script will actually do. "plus eventually the game will be playable on *nix through wine, and using the scripthook.net bindings on wine is not easy" Even if they manage to run GTA V on linux, there's a big chance scripthook won't work. And if it does, there's mono which comes with the most popular distros. Link to post Share on other sites