Looking for some advice with changing vanilla scripts.

Post » Sun Nov 18, 2012 6:33 am

I absolutely hate the stages of Vampirism. They don't change in Dawnguard either. Some of the abilities seem adjusted but overall the whole getting stronger as you starve is [censored] to me.

Okay, that said. Now you will understand what I'm trying to do.

I want to change the stages. The last time I did this I created a mod called Draekic Vampires. It was moderately successful at accomplishing my goal. However it had conflicts with some users and especially other mods that use the default PlayerVampireQuestScript. My previously mentioned mod created it's own script and quest to replace the default. So, now I ask you: What is the best way to go about changing the stages of Vampirism?

Should I edit the default script?

I'm looking for advice on the cleanest way to change something scripted in Vanilla.



Goals:

-Reverse Vampirism. Have the stages weaken the player not strengthen them. But by weaken I mean increase the passive buffs(or debuffs) that occur through staging.
-I want to completely remove the adding and replacing of powers/spells and make it so that regardless of stage(s) the player vampire has the same powers/spells at all times while still a Vampire.
=Finally, I want to add some new weaknesses, powers and buffs/debuffs to the player vampire.

Now I know how to do most of this and as I said I created a mod prior that accomplished it for the most part. It just didn't play well with other mods and probably about 30-40% of the players who used my mod had problems with compatibility or with the mod working at all.

I hope I've been clear. I look forward to any advice you the community might offer.

Thank you.
User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Sun Nov 18, 2012 2:22 pm

The cleanest way is to react to things that happen, by listening for "events".

The best way to listen for events ... if there is an applicable event to listen for, is the Story Manager System: http://www.creationkit.com/Story_Manager

If you can't use that, then you can achieve similar with scripts and game-start-enabled quests.

Once you intercept an event (like levelling up, or whatever) you can alter what has happened (note, the game may still do the vanilla stuff - depending how you wrote your intercept stuff - but then immediately your stuff will kick in and alter it)

However: Changing vanilla is (almost) always going to lead to compatibility issues with (some) other mods, as those mods are often relying on a vanilla script to be doing what it is supposed to be doing.

The compatibility rule of thumb is: Never Change Anything Vanilla. So you are starting from a bad place, if you see what I mean ... even if you don't actually amend vanilla code or objects, you are still effecting the outcome of vanilla routines that other modders maybe relying on.

That's not so much of a problem ... may mods "change the game" ... but very few of them are also compatible with all other mods.
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am

Post » Sun Nov 18, 2012 5:50 am

Thanks for your reply. It has offered me a different perspective that I think will help.

I'm struggling most with the stages of vampirism. May I ask a question? How do I instruct the game to use my quest over one currently running on the player or instead of the quest destined to run on the player? What I want to do is pretty simple (this time around). I want to eliminate the swapping of abilities during vampire stages and instead have the vampires weaknesses grow, not strengthen, as the vampire starves. I know enough Papyrus/CK to do all the coding and other bits but I want to make sure 'my' vampire is running over or rather in place of the default vampire.
User avatar
SUck MYdIck
 
Posts: 3378
Joined: Fri Nov 30, 2007 6:43 am

Post » Sun Nov 18, 2012 3:31 pm

It's tricky, but doable. Yoiu must go through the vanilla scripts and figure out what starts the first step that you are unhappy with.

Then you are into the listen/change dilema.

From what you have written it seems unavoidable that you will - at the point you identified - have to amend one or more vanilla scripts. Depending on how that full system (vampire quest line) works, you may have to make many small alterations to get it to stop running. In essence, at the point you want your stuff to take over you add a STOP to the scripts in the vanilla quest and in the same place add a START for your quest.

If you are really lucky, you may find a Story Manager Event that starts off the vanilla vampire stuff you want to kill ... stopping just that SM Event would stop the vanilla vampire stuff (but usually we are not so lucky and no such SM Event exists ... which means you are crawling through quest-chains and scripts, aliases and packages (and alias scripts) to try to figure where you can cleanly edit and fork-away from that quest-line.

The alternate start mods - of which there are plenty - all work this way. Many people had lots of trouble, initially, getting their stuff to fork correctly. Often it is not straight-forward to identify what needs to be changed ... especially when so many quests/characters can effect seemingly unrelated quests/characters,

However, to repeat; doing any of the above will almost certainly lead to conflicts with other mods ... But given what you are trying to do (change the vampire system) I think that is just going to be the way it has to be.


http://www.creationkit.com/IsRunning_-_Quest <- Will probably be of use ... from the CONSOLE ... while you are testing what is switched on and what is switched off. Note the STOP and START commands too ... also useful if you want to muck about testing what effect stopping/start things has without coding the changes.


Oh, and finally, DIRTY-SAVES. It is almost certain that the mod you create will not be pre-saved-game compatible. Anyone wanting to play your mod would need to start a new game (or start from a save in which they had not touched the vanilla vampire system ... and experience says there will be few of those as the vampire system will almost certainly be effected by - and have effects on - other quests. For example, if any of the vampire system is start-game-enabled you almost certainly will have a mod that is not pre-saved-game compatible)
User avatar
Yung Prince
 
Posts: 3373
Joined: Thu Oct 11, 2007 10:45 pm

Post » Sun Nov 18, 2012 12:44 pm

Amazing my friend. Thank you so much. May the loot gods favor you.
User avatar
Floor Punch
 
Posts: 3568
Joined: Tue May 29, 2007 7:18 am

Post » Sun Nov 18, 2012 12:07 pm

Hey Draeka,
You might have heard of my vampire mod for Oblivion, Unholy Darkness. My mod got so huge it had to be a new game, and it could not be properly uninstalled. People were fine with that and swore by my mod. My take on it is if you create value, people will flock to your mod and not care about incompatibilities. It's the OTHER mods that have to go, not yours. For someone to want two vampire mods to work at the same time is like asking for Oblivion and Skyrim to be one seamless game running at the same time. It's just not really feasible. You can't please everyone or your will end up pleasing noone. I do what I want, because at the end of the day you can't concern yourself with other mods and compatibility or you end up a slave to the users, scrambling to please people. Modding is about making something you like, and if others like it great, but don't beat yourself up trying to please everybody.

That said, about the only way to do it would be to just make a new quest that reads some of the playervampirequests variables, like vampirestatus, etc. Use that to detect if the player has been bitten, and then trigger functions in your own quest to add powers and mimic the vampire quest. Cure the player of vanilla vampirism, yet use bethesda's spells and stuff you like, and make your own vampires. Copy whatever functions you like, but essentially your not a vampire, your something else. But its a lot of work and hardly worth it in my opinion replicating their vampires just because people want their cake and eat it to.
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Sun Nov 18, 2012 11:36 am

I have to agree with madmole. You have to decide if you are making this mod for yourself or other people. If you care how many people use or download your mod, then you better start by purchasing Dawnguard and build on top of that as most Vampire Enthusiasts (and non-enthusiasts) are going to own that DLC... if you create something that isn't compatible, you have already lost a majority of the downloader base.

But if you make it for yourself, then you dont have to sweat if only 5 people download it or how many endorsments you get or what your steam rating is. All that matters is that it makes you happy. And like madmole said, if it makes you happy, then there is a good chance it will make others happy.

That said, if you are editing a vanilla quest, I would recommend a coding technique known as script extension. At some point, the original quest will call scripts and you can override what those methods do by writing a new script that extends the original. You can read all about it on the creation kit forums. It will maintain compatibility with other mods, but that is not the reason you use it.

YOu dont want to change the vanilla scripts for many not-so-obvious reasons. One of those reasons is that there is no easy way of getting the original source code back once changed. Then there is the fact that creation kit stores your files in your local Data directory ... which also happens to act as a override source. So if you create a mod, change a vanilla script, compile it and then disable the mod in the Data Files menu... your script change will still be running because it is in the Scripts directory and is now acting as a override file. Whereas if you extend the file and disable your mod, the changes will properly stop executing. Being able to toggle your mod on the development box is important for testing the various activation\deactivation scenarios. What if someone is already starving when they activate your mod. Do you act immediately or do your changes not take effect until an event fires.... scenarios like that.
User avatar
Becky Palmer
 
Posts: 3387
Joined: Wed Oct 04, 2006 4:43 am


Return to V - Skyrim