Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codetype 5 - Enable a code when unloading. #22

Closed
leiburj opened this issue Jan 22, 2021 · 5 comments
Closed

Codetype 5 - Enable a code when unloading. #22

leiburj opened this issue Jan 22, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@leiburj
Copy link

leiburj commented Jan 22, 2021

Hello, i have a doubt about if codetype 5 is still implemented in the latest version.

I don’t remember if it was on r5 or if it was a modded version, but with codetype 5 you can enable a code when pressing select on xmb.
The use for this was for example to disable the no collision code on fallout 3/nv

Here is a post from haxxxen explaining this.

3E24D509-BB92-46D9-BAFF-E6C84693A383

I tried using a code in the latest release and it didn't work.

Thank you.

@bucanero
Copy link
Owner

no, that's not available on the current releases of Artemis.

but if you can get the plugin file from that haxxen message, then you can just replace the artemis_ps3.sprx file and use it with Artemis r6.2 . It should work.

btw, if you do find the plugin file he mentioned, please upload it here, so I can try it and add it to the next version.

@leiburj
Copy link
Author

leiburj commented Jan 23, 2021

Ill try, thanks for answering.

@leiburj
Copy link
Author

leiburj commented Jan 26, 2021

Found it, here it is:

artemis_ps3.zip

And here is an example on how to make a code to disable another:

No Collision
0
0 0113156D 01
#
(OFF) No Collision
0
5 0113156D 00

It should also be noted that you can enable any code when exiting using codetype 5 not only the original code whithout modification.

Tested it with fallout 3 and it works perfectly.

Gracias de nuevo.

@leiburj
Copy link
Author

leiburj commented Jan 27, 2021

I was looking at the source and I’m not sure if I’m missing something, but for adding the plugin to the code I think this is the code that needs to be changed.

ARTEMISPS3-GUI/src/main.c

const char* plugin_opts[] = {"< Artemis r5 >", "< mod/Haxxxen >", "< JokerSelect >", NULL};

void plugin_callback(int index, int sel)
{
	if (sel < 0)
		sel = 0;
	if (sel = 1)
		sel = 1;
	if (sel > 2)
		sel = 2;
		
	char tmp[128];
    snprintf(tmp, sizeof(tmp), ARTEMIS_PATH "artemis_r%d.sprx", 5+sel);

    sysLv2FsUnlink(ARTEMIS_PATH "artemis_ps3.sprx");
    sysLv2FsLink(tmp, ARTEMIS_PATH "artemis_ps3.sprx");
	menu_options_selections[index] = sel;
}

That way the plugin would be named artemis_r7.sprx. And it would appear as JokerSelect in the plugin options.

I don’t know much about programming but I’ll appreciate it if anyone corrects me if I’m wrong.

@bucanero
Copy link
Owner

thanks for sharing the mod plugin file and the code examples

I'll try it out, and if works ok I'll include it in a next release 👍

@bucanero bucanero added the enhancement New feature or request label Apr 23, 2021
@bucanero bucanero self-assigned this Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants