IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

This section is for any editing topics that don't fit into any of the other forums, any questions on how to mod belong in Editing Discussion

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (5) 1 [2] 3 4 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 SCM Hook for San Andreas

 get it here
 
ceedj  
Posted: Wednesday, Nov 30 2005, 18:26
Quote Post


PEDS Creator
Group Icon
Group: Members
Joined: May 21, 2005

us.gif

Member Award




Houston, we have a problem. blink.gif

Animation Sequences work fine ONLY if the amount of characters in the file name(s) is 8 or less. Which is why this works:

CODE

DEFINE_OPCODE(action_seq, 0x0605, "vssfiiiii");

theScript << action_seq << WhichPed << "TAP_HAND" << "PED" << 4.0 << 1 << 0 << 0 << 0 << 2000;


But this will not:

CODE

theScript << action_seq << WhichPed << "IDLE_CHAT" << "PED" << 4.0 << 1 << 0 << 0 << 0 << 2000;


Anyone have any ideas on how to overcome this? I think the charcters need to be set around 13-16...
Users WebsitePM
  Top
 

 
Un3462  
Posted: Wednesday, Nov 30 2005, 18:53
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jun 27, 2002

Member Award




i don't know much c(++), but try changing the following in scripting.cpp:
CODE
Script& Script::operator<<(const char* str)
{
  BYTE b[9];
  if (!str)
    return *this;
  memset(b, 0, 9);
  b[0] = 9;
  strncpy((char*) b + 1, str, 8);
  add(b, 9);
  return *this;
}

to
CODE
Script& Script::operator<<(const char* str)
{
  BYTE b[34];
  if (!str)
    return *this;
  b[0] = 14;
  b[1] = strlen(str);
  strncpy((char*) b + 2, str, b[1]);
  add(b, b[1] + 2);
  return *this;
}
PM
  Top
 

 
ceedj  
Posted: Wednesday, Nov 30 2005, 19:15
Quote Post


PEDS Creator
Group Icon
Group: Members
Joined: May 21, 2005

us.gif

Member Award




Wow. Just like, WOW.

THANK YOU CYQ!!! inlove.gif inlove.gif inlove.gif inlove.gif

I had suspected that this was the section that needed to be altered.

Just out of curiousity, how did you arrive at those values? In case I need to bump it up again? (I gather the "b[0] = 14;" is where it is set)

Also note that if you want to use animations in files OTHER than "PED" you will have to load it first using the load_animation opcode. You should probably release_animation after you're done as well.

Many HUGE thanks again! rah.gif

EDIT: Ok the longest string I was able to find thus far is "BMX_TALKRIGHT_LOOP", and I didn't need to change any values for it to work, so unless I find one bigger that causes a problem, I don't think anything needs to be changed. Awesome. smile.gif

This post has been edited by ceedj on Wednesday, Nov 30 2005, 19:35
Users WebsitePM
  Top
 

 
Un3462  
Posted: Wednesday, Nov 30 2005, 19:41
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jun 27, 2002

Member Award




14 is the parameter type for a variable length string. the byte after that is the string length, and the rest is the string (not null-terminated). the hook might not handle variable length string variables correctly either, but i don't think you really need those.

to bump it up again you only need to increase the buffer size, which is now 34 (partype byte + length byte + 32 byte string, which is more than enough, and i don't even know if such long strings are supported by sa's interpreter). or, depending on how "add" is implemented, you could try simply sending it the two special bytes first, and then another "add" call for the string directly from the function argument.
PM
  Top
 

 
WarMachine245  
Posted: Sunday, Jan 8 2006, 03:52
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Aug 15, 2005

XXXXX



will i have to start a whole new game to use this thing?
PM
  Top
 

 
random_download  
Posted: Sunday, Jan 8 2006, 10:11
Quote Post


:o
Group Icon
Group: Members
Joined: Mar 7, 2004

uk.gif

XXXXX



QUOTE (WarMachine245 @ Jan 8 2006, 03:52)
will i have to start a whole new game to use this thing?

No.
Users WebsitePMMSN
  Top
 

 
NFO_bakasan  
Posted: Monday, Jan 9 2006, 06:52
Quote Post


VC:MP Developer
Group Icon
Group: Members
Joined: May 13, 2004

XXXXX



very nice work icon14.gif icon14.gif
Users WebsitePM
  Top
 

 
Sobeit  
Posted: Thursday, Jan 26 2006, 17:17
Quote Post


mta ninja
Group Icon
Group: BUSTED!
Joined: May 11, 2004

us.gif

XXXXX



ill gladly mirror this file, but the link here is broken.

anyone who could send it to me it would be great.
Users WebsitePM
  Top
 

 
AlienX  
Posted: Saturday, Feb 18 2006, 16:11
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 4, 2005

XXXXX



link works good for me but otherwise

Download Here
PM
  Top
 

 
Cerbera  
Posted: Sunday, Feb 19 2006, 18:45
Quote Post


Ben "Cerbera" Millard
Group Icon
Group: Members
Joined: Jun 22, 2002

en.gif

Member Award




Removing the height and speed limits for planes is awesome, I can't believe I havn't found this mod before!

By the way, OP, you really need a better host. There was a queue of half an hour for me to download this, which I only realised after looking through every piece of randomly positioned text on the automated download page. I used AlienX's mirror in the end.

Is there a way to specify which install of GTASA the loader starts up in? I've got two installs and it always loads up my backup one, without letting me choose whether that's the one I want or not. It's a pain having to run my modded install, tab out of it, start the loader, than tab back in every time I want to test a change to an airplane setup.

It's a great mod, I really like being able to fly at high speeds and altitudes, it's just a bit inconveniant having to switch between GTASA and the desktop. smile.gif

(EDIT) Using the limit removal for planes, I've come up with a Hydra setup which accelerates a bit more realistically and have released it in my GTASA Handling Overhaul topic. Top speed when flying level is about 600mph. However, thanks to the height limit remover, you can do massive dives to get over 800km/h! colgate.gif

(EDIT2) I've worked around the GTASA install selection. I created a shortcut to the EXE on my desktop, opened its Properties and then set the Shortcut key. I can now just press Ctrl+Alt+L when at the main menu in GTASA to start the loader. I can then use the loader's built in shortcuts for turning off the speed limit (Alt+F9) and altitude limits (Alt+F8) in-game.

This post has been edited by Cerbera on Monday, Mar 6 2006, 14:26
Users WebsitePM
  Top
 

 
Djorn  
Posted: Monday, Feb 20 2006, 09:15
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 27, 2005

au.gif

XXXXX



Hi!

Can someone please explain how to convert/rewrite the scm script to work this SCM Hook??
And where/which file so edit/save it too.

If anyone can help it would be greatly appreaciated

Thanks Djorn
PMMSNYahoo
  Top
 

 
Suction Testicle Man  
Posted: Monday, Mar 6 2006, 10:34
Quote Post


Yeah, well, you know, that's just, like, your opinion, man.
Group Icon
Group: Network Admins
Joined: Sep 27, 2002

Member Award




Download mirror added to first post, due to problems with RapidShare.

<3D
Users WebsitePMXbox Live
  Top
 

 
Hiddenshadow  
Posted: Monday, Mar 6 2006, 14:02
Quote Post


VC Phoenix Fanatic
Group Icon
Group: Members
Joined: Apr 18, 2005

be.gif

XXXXX



Awsome mod,love it!

altough i do have 2 things:

like cerbera said,it would be nicer if you could choose the gta:SA dir.

also(just warning people), when you are falling from a height, and you activate the decreased gravity, *splat* your dead, just like you'd hit the ground.
PM
  Top
 

 
SilverGlow  
Posted: Saturday, Mar 11 2006, 13:25
Quote Post


It's peanutbutterjelly time!
Group Icon
Group: Members
Joined: May 10, 2005

nl.gif

XXXXX



ok maybe i'm just a noob and u guys already know it but when i went to the liberty city area there is a hidden interior at marco bistro's, it even has classical music playing in the background.. looks really cool smile.gif
PMMSN
  Top
 

 
JGuntherS@NL  
Posted: Sunday, Apr 2 2006, 18:37
Quote Post


Being a being
Group Icon
Group: Members
Joined: Nov 15, 2005

nl.gif

XXXXX



How do I use the GXT hook? I'd like to add some labels of my own, but how should I do that? Or is that impossible, is the only way to use the GXT hook to modify the original GXT labels? Or should I return the string and set *gxtLabel to the name of the label in customStrings?

Thank you in advance smile.gif

And, btw, the SCM part of the hook works great smile.gif

EDIT: Never mind, I think I know how it works now. The SCM (or the game) requests a GXT entry, which is passed through the hook. I thought it was preloaded at the start of the game blush.gif .

This post has been edited by JGuntherS@NL on Monday, Apr 3 2006, 14:45
PMMSN
  Top
 

 
teevee  
Posted: Thursday, Apr 6 2006, 08:37
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Aug 12, 2002

XXXXX



This mod is pure genius.
PM
  Top
 

 
jarjar  
Posted: Sunday, Apr 9 2006, 04:13
Quote Post


Boss
Group Icon
Group: BUSTED!
Joined: Aug 7, 2005

au.gif

XXXXX



Ah good, i have been looking for he download for this, i lost it when my computer crashed. Thank god i found it again. Thakns to STM for the new download mirror, i hate Rapidshare. smile.gif
Users WebsitePMMSNAOLYahooICQ
  Top
 

 
ceedj  
Posted: Thursday, Apr 20 2006, 05:21
Quote Post


PEDS Creator
Group Icon
Group: Members
Joined: May 21, 2005

us.gif

Member Award




Found a bug! But I fixed it. In Scripting.cpp, change:

CODE
void Or(Script& s)
{
Block* b = s.peek(1);
if (!b) {
 s.dwErrors |= ERROR_NESTING;
 return;
}
if (!b->addr) {
 s.dwErrors |= ERROR_CONDITIONAL;
 return;
}
BYTE& c = s.bScriptBuffer[b->addr];
if (!c) {
 c = 20U;
 return;
}
if (c < 20U || c >= 28) {
 s.dwErrors |= ERROR_CONDITIONAL;
 return;
}
c++;
}


to this

CODE
void Or(Script& s)
{
Block* b = s.peek(1);
if (!b) {
 s.dwErrors |= ERROR_NESTING;
 return;
}
if (!b->addr) {
 s.dwErrors |= ERROR_CONDITIONAL;
 return;
}
BYTE& c = s.bScriptBuffer[b->addr];
if (!c) {
 c = 21U;
 return;
}
if (c < 21U || c >= 28) {
 s.dwErrors |= ERROR_CONDITIONAL;
 return;
}
c++;
}


(you're changing the c = 20U; to c = 21U; and (c < 20U) to (c < 21U) .)

If you don't do this, your "Or" commands won't work. Frustrated me for about two hours. smile.gif

Hope this helps some peeps.

EDIT: According to the ReadMe, it says you can have up to nine conditionals, but according to this post, you can only have up to 8. Unless this changed for San Andreas. Can anyone confirm this (besides my own testing tounge.gif)?

This post has been edited by ceedj on Thursday, Apr 20 2006, 07:18
Users WebsitePM
  Top
 

 
oCain  
Posted: Thursday, Apr 27 2006, 17:49
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Oct 2, 2005

eu.gif

XXXXX



QUOTE
# If you don't want to use the supplied classes, you can use your favorite script builder/compiler and stuff raw script bytes with Script::add().

Cool!
But...How?
I ain't find nothing. sad.gif
If someone knows anything about it...Please Post!
Thanx!

Oh...
@op9080: Great Stuff! biggrin.gif
PM
  Top
 

 
JGuntherS@NL  
Posted: Thursday, Apr 27 2006, 18:08
Quote Post


Being a being
Group Icon
Group: Members
Joined: Nov 15, 2005

nl.gif

XXXXX



QUOTE (oCain @ Apr 27 2006, 17:49)
QUOTE
# If you don't want to use the supplied classes, you can use your favorite script builder/compiler and stuff raw script bytes with Script::add().

Cool!
But...How?
I ain't find nothing. sad.gif
If someone knows anything about it...Please Post!
Thanx!

Oh...
@op9080: Great Stuff! biggrin.gif

What do you want to do? Creating a script in another editor and putting it in the injector? If yes:

Make yourself a script in your favorite editor, and compile it. Use a hexeditor to get the raw script bytes. Be sure not to copy the headers and such! Then you'll need to add them using script::add(). You could either put add(byte1), add(byte2) and so on in buildScript(), but you could also make a little file-handling-thingey, which reads the bytes from a file and adds them.
PMMSN
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (5) 1 [2] 3 4 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG