Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Ways to work around ShowRaceMenu issues?


Expresate
 Share

Recommended Posts

So, I've created a small mod that allows me to initiate the race menu through dialogue. This just gave a more reliable and immersive option for the racemenu. What I have now works fine. However, you still can't change your race, because of stat reset, and any change in the racemenu causes your enchantments to be disabled until you reequip your items. So, in order to actually give my mod some practical use, I've been trying to think of ways to work around that.

Ideas that have come up are:

Use a script that records the player's stats before the racemenu is opened, and resets them after it's closed

Use a script that unequips, and somehow saves?, the player's gear and possible reequips them afterwards

I don't even know if these are possible nor the complexity of the scripts that could be done. How does code?

So, do you think these can be done? Could it end the scourge of negative effects with the Race Menu? Will our heroes ever return home? Find out next tim- You get my point.

Any ideas?

Also: I'm sorry for the plethora of questions I ask on this forum. I don't mean to be so annoying.

Link to comment
Share on other sites

Some things I do (I think) know.

1. You cannot determine what armor the player is wearing. I think you can figure out what weapons they have equipped.

2. GetAV and SetAV can help you record the players stats.

3. I would simply remove all items from the player and dump them in a chest. Then equip 'scrubs' for the player to wear. After all, that was some major surgery! :lmao:

Link to comment
Share on other sites

1&3 I see! I like the scrubs idea. A lot.

2. I was thinking about Get/SetAV. Good to see they might work!

Now the biggest issue is still implementing these. How exactly could I go about doing that? I suppose I could look up the script for removing the equipment and placing it in the chest. Would it be fine to put those in a dialogue end script? What about the script to equip the "scrubs?" Or better yet, would unequipall work for the player? They wouldn't have to fiddle with a chest that way. I could still equip the scrubs.

And the main one is of course Get/SetAV. Seems like it'd be a little large to fit in a dialogue fragment. I'd have to GetAV for every stat, yeah? And then there's setting the stats after they leave the menu.. maybe the best way to do that is maybe through dialogue? Or a button? Unless there was some way to set it after you leave the menu. I don't see attaching the set script to dialogue being particularly challenging.

Sorry, I'm new to scripting in general and (I suppose like a lot of people here) unbelievably new to Papyrus. I suppose I'd have to do a lot of research to get these running.

Link to comment
Share on other sites

I am not familiar with quests or dialoge. Just saying. ;)

Yeah, unequipall would work. The other command is 'RemoveAllItems' and you can use it to place all the items into a chest.

Here is an example of GetAV:

int playersHealth = Game.GetPlayer().GetActorValue("health") as int

You can find a list of the actor values here: http://www.creationkit.com/Actor_Value_List

Link to comment
Share on other sites

Alright, I feel terrible in saying I still have no clue where to start. I'm going to fiddle in the CK, look up some tutorials, and all that.

I do have experience with quests and dialogue (small amounts) so I can figure my way around those pretty easily. I'm going to see if I can't write a script the normal way and then attach it to the dialogue. I've only done it with Papyrus fragments.

Also, does GetAV save the values it returns? It just doesn't seem like I could do GetAV and then immediately do SetAV. Would you save the values to a variable, or something? Then SetAV to... okay.. you get what I mean. I'm just very clueless. I'll figure this out, though! You'll see!

...hopefully...

...maybe...

Link to comment
Share on other sites

In my script example, I am defining a variable

int playersHealth

and making it equal to the return of the GetAV function on health.

Now, I am not sure how the scripts work in the dialog boxes but I would guess you would need to save the values to a global value or something. If its saved in a global, any script anywhere else can access the value it contains.

Link to comment
Share on other sites

I like to prefix all the objects I make in the CK with the name of my mod.

for example, 'Levelers Towers' objects get prefixed with 'Levelers'. It just makes it easy to find things later on.

You can name the global variable anything you want. When you attach the global property to your script, you give it the name your using in the script there. I like to use the same name as what I am attaching, that way, it automatically finds and links it when I attach the property.

Link to comment
Share on other sites

So I shove the badger into the net and fly the chicken barn door? :lol:

I'm sorry, I'm just slow on the uptake today. Examples are nice. I understand what you said in your last post, I'm just having issue visualizing what it is I need to type. Maybe I'm just not meant for scripting. You don't have to help me anymore. If I can't figure out the basics, then there's no point attempting this stuff. I'll try with what I've got, but, eh. Sorry for wasting your time.

Thanks for the help you've given me so far.

Link to comment
Share on other sites

...I still don't understand the script I would use to get the stats. Would I use the same thing as when I was just defining a variable? As in, "int?" Or is it different for globals? Your tutorial didn't help me much with that. Or maybe I'm just stupid. More than likely the latter.

I've made all the globals. They're there. One example would be BarbplayersHealth.

Link to comment
Share on other sites

There is no need to call yourself stupid, cause your not. It just takes some time for the information to click in your mind.

You import the global into your script using the Properties button.

You would then need to link the globabl property to the global object you created. You can now use the global in your new script.

My first tutorial goes over importing properties of a messagebox. You would use the same technique to import and link your global.

Link to comment
Share on other sites

  • 1 month later...

Progress! Sort of. In this time I've been learning a bit of lua, so I haven't entirely given up on scripting in general. But that's not important. What's important is I found a much easier way to do this! All I have to do is set the player to god mode before the race menu opens. Then they're free to change what they want without any damage to their stats, skills, or perks. Then I need to find a way to have god mode disabled afterwards. Maybe a dialogue option with the NPC? A spell effect?

Anyway, I tested it by just using the console it and works. I changed my test redgaurd to an orc and all stats were saved. The redgaurd race power was even replaced with the orc race power.

Anyway, I'm posting this since I'm not entirely sure how I want to go about this. Any suggestions? I can easily turn on godmode via a dialogue end script, but I'm not entirely sure what to do to turn it off afterwards.

Link to comment
Share on other sites

Usually god mode is a toggle. How are you turning it 'on'?

Wiki searched it earlier, and this looks like the script to do it. Am I wrong?

Would just place "debug.SetGodMode(true)" in the end scripts for the appropriate dialogue.

I'm just asking for suggestions on how to turn it off. Have a button nearby? Dialogue option? Maybe there's a way to turn it off as the user closes the race menu? Just asking for basic ideas.

Link to comment
Share on other sites

ah, see, the bit about turning if on in dialog and not knowing how to turn it off threw me.

Just use dialog 'start' to turn it on and dialog 'end' to turn it off? I don't mess with dialog so I am not sure where those would go.

It really depends on what you want. And how you want to accomplish the task. But a magical plastic surgeon would be the 'cleanest' way to do it.

Unless you want some dwemer machine to do it, then you could just script it all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...