Jump to content

Removing xp


Roland

Recommended Posts

I'll ask him. It'll also give me a chance to ask about the future of his invisible HUD mod as well. :)

 

As to the question, I'm thinking 1 skill point earned increases player level by one as well. That is how it is in the vanilla game albeit in reverse causality but the general progression of gamestage should be close to the same and actually somewhat controllable by the player. Do little to no quests and your level will rise by one daily which is slower than the current pacing for most people. Do lots of quests and your levels will rise much more rapidly.

Link to comment
Share on other sites

I was digging around in this too to my mod which is similar to your idea.

 

The way im planning on controlling GS is editing Gazz's spreadsheet and then bluntly just pasting it in to gamestage.xml.

(Link to Gazz's GS can be found here: https://7daystodie.com/forums/showthread.php?56533-Gamestage-Blood-Moon-Horde-generator)

 

In there you can change some values in the "Type_" tabs.

for example:

 

A6: Gamestage Exp: 1 (GS multiplier gives 1+ to every gamestage so you get 1,2,3,4....)

A8: Random Start: 7 (When more dangerous zombies like feral starts to spawn. At day 7 seems ok?)

A9: Random End: 28 (When most dangerous zombies like Rad starts to spawn. Set when you want endgame to start)

 

And then just export the "GroupOutput" tab and paste it into gamestage.xml

 

 

 

And then you have to do the math on the player GS multiplier.

gameStage = ( playerLevel + daysSurvived ) * gameDifficultyMultiplier

 

ex:

 

gameStage = ( pL(0 never gain level) + daysSurvived ) * gDM(1)

 

I don't know if all is hardcoded but there is a refrence to daysAliveChangeWhenKilled and gameDifficultyMultiplier in gamestage.xml.

And you all ready know where to modify the xp= player level.

Link to comment
Share on other sites

I have been incredibly busy this week but tonight I finally went on and found your message to me that it was done. So I scrolled back to Saturday and downloaded it and it is fantastic.

 

So to catch everyone else up who is interested:

 

Guppy created an sdx mod for me that would initiate two buffs with a timer. One buff was 5 seconds long and would give me a skill point. The other buff was 59 minutes and 55 seconds long and it would countdown until the next time the first buff would be triggered and give me a skill point.

 

Genius. So I was very curious about what he had done and while I couldn't open the sdx file I did look at the xml files to try and understand how his little skill point generating engine worked and I was able to understand it!

 

There were a couple of problems that I found as I played but I was able to solve each one and I felt really proud even though all the heavy lifting was already done for me. But still...it was exciting for me at the level I'm at and once again...all due to Guppy

 

Problem 1: Blinking Icons

I couldn't handle them but the solution was as simple as typing false for each icon. I didn't feel especially proud of this achievement.

 

Problem 2: It didn't initiate after spawning from a death

This one I was very proud of myself. I noticed in the entityclasses xml that Guppy provided that the buffs were only set to trigger at gamestart but not after respawning so I did a search in the game xml file for entityclasses for "neardeath" and found a line that was just like the line Guppy used to trigger the buffs at game start except it was for triggering buffs onSelfRespawn. So I copied that line into the mod right after the line that started the whole thing going on game start and it worked like a charm. I turned from the computer with a big smile on my face but my family was already in bed so nobody saw my triumph.

 

Problem 3: The xp giving buff triggered first which meant starting the game with 1 skill point and respawning after death gave 1 skill point

This stumped me. I tried switching the order that the two buffs were listed but that did nothing. Then I noticed that in entityclasses it was the giveselfxp buff that was being triggered on gamestart and respawn and then the waiting buff would then be triggered by that buff. So I reversed it and made it so that the waiting buff would be triggered by the spawn events and the skill point giving buff would be triggered by the waiting buff. It worked! That one felt good.

 

So long story short, thanks to Guppy I have a small little perpetual engine that generates a skillpoint every 60 minutes of real time. When I first envisioned this I thought it would be good to get the point each morning if I hadn't died the previous day. The way this works is that if I die it resets the 60 minute timer before I can get another skill point so if I want to get that skill point I have to stay alive. Very exciting!!!

 

I don't know how he did it but Guppy also removed all xp from the game. Before adding his mod I returned my game to pure vanilla so I thought I would be getting some experience until I could go back and change it again. But even though my options says 25% I am not earning any experience points whatsoever. So I am curious but grateful that that part is handled as well.

 

I do think I am almost ready to put a rough version of this together that won't be pretty but could be downloaded and tested by interested people. I have been enjoying it greatly.

Link to comment
Share on other sites

Problem 1 was something I inadvertently left in to test to make sure it worked. I think I may have left in a 2k bonus of casino tokens too, but I noticed you didn't mention that. =)

 

Problem 2 is weird; I thought buffs persisted after death but it's something I'll look into. The second part of Problem 2 is directly due to you not having your family line up against a wall watching and praising your achievements. That's just poor parenting, and frankly, you not keeping your spouse in line. Shame, but the Council Of Men In Charge will deal with you separately on that.

 

Problem 3 seems like you handled it like a true modder. You dug in and changed something to fit your wants. Welcome.

 

I looked into the sdx code, there is nothing that removes XP that I could see (it's a very small script) so I'm guessing that there is still something on your end? I dunno. Not a coder, maybe his script does remove it. <shrug> =)

 

Either way, you should do a youtube series on this.

 

Sounds kinda nifty.

Link to comment
Share on other sites

Problem 1 was something I inadvertently left in to test to make sure it worked. I think I may have left in a 2k bonus of casino tokens too, but I noticed you didn't mention that. =)

 

Problem 2 is weird; I thought buffs persisted after death but it's something I'll look into. The second part of Problem 2 is directly due to you not having your family line up against a wall watching and praising your achievements. That's just poor parenting, and frankly, you not keeping your spouse in line. Shame, but the Council Of Men In Charge will deal with you separately on that.

 

Problem 3 seems like you handled it like a true modder. You dug in and changed something to fit your wants. Welcome.

 

I looked into the sdx code, there is nothing that removes XP that I could see (it's a very small script) so I'm guessing that there is still something on your end? I dunno. Not a coder, maybe his script does remove it. <shrug> =)

 

Either way, you should do a youtube series on this.

 

Sounds kinda nifty.

 

I still have a long way to go but if one of the symptoms of being a modder is startling awake to see you've typed 500 'f"s after dozing off because you stayed up way longer than you intended to then perhaps I do feel "something coming on".... ;)

 

I'll have to go through and check. I'm pretty sure I reversed all the changes I made so I don't understand how it was that I was getting no experience from anything. It's great but I want to know why. Once sphereii has a chance to help me gain a level for each skill point I think I'll be ready to show it off with a let's play and maybe start a thread in the mod subforum with downloads for those who are interested.

 

I'm not exactly sure how best to make files available for others to download so I'm happy to hear preferred methods from others. Also I want to try to see if I can do an xpath modlet for the quest changes I made and the zombie loot drop changes I made. But that will take time so for starters I'll just provide the replacement files for quests

Link to comment
Share on other sites

You can either get a git account or I can host it, doesn't matter, then the link goes to Sphereii and it goes on the mod launcher.

 

I prefer gitlab.com over github.com but either way there will be a steep learning curve.

 

- - - Updated - - -

 

And yeh you've definitely got the bug. :)

Link to comment
Share on other sites

Yeh we say that alot about him.

 

Other stuff too, but it involves cows and is a golden circle thing. You're barely an initiate.

 

- - - Updated - - -

 

But kidding aside how is it playing?

 

If I know about the cow does that mean IM in the inner circle?

 

This changes EVERYTHING!

Link to comment
Share on other sites

It can certainly be used as base dll to patch with sdx. As long as there is no sdx patchscript doing the same as my edit. That would make my dll obsolete anyways. But i just made this for vanilla players who dont want the popup, so there is no worry about sdx compatibility from my side.

 

Cheers

Link to comment
Share on other sites

Yeh the new mod launcher compiles on the go, so the downside is scripts will be visible to all, but the upside is sdx will be seamless to the end user and you can mix sdx mods.

 

And bottom line is scripts are visible to anyone who REALLY wants to look at them anyway, so...

 

Sdx is definitely the way to go imo. Hell I may even learn coding. :)

Link to comment
Share on other sites

Yeh the new mod launcher compiles on the go, so the downside is scripts will be visible to all, but the upside is sdx will be seamless to the end user and you can mix sdx mods.

 

And bottom line is scripts are visible to anyone who REALLY wants to look at them anyway, so...

 

Sdx is definitely the way to go imo. Hell I may even learn coding. :)

 

Naaah. I dont do clientside mods really. This patch was made over morning coffee cause i saw some threads and posts that were indicating there was a demand for it. I do serverside patching with harmony and this lil patch will probab be the only clientside patch ill ever make. Ill stick to harmony and let the sdx stuff to those that want to do clientside mods :)

 

Cheers

Link to comment
Share on other sites

I want to attempt creating a modlet to change the quest rewards from giving experience to giving skill points. I want to change this:

 

<quest id="tier1_clear">
	<snip>
	<reward type="Exp" value="5000" />
	<snip>
</quest>

 

into this:

 

<quest id="tier1_clear">
	<snip>
	<reward type="SkillPoints" value="1" />
	<snip>
</quest>

 

My question is whether there is a way through xpath to change "Exp" into "Skillpoints" and set the new amount in one step or do I first have to append the new line I want and remove the old line as two steps? What would be the best xpath function to use in this case?

 

Also, will I be able to change all quests or will I have to write a pathway for tier1 quests, tier2 quests, tier3 quests, etc separately?

 

I have already gone in and changed the actual quests.xml as shown above and know that it works and that it is awesome-- but I'd like to try it as a modlet and I'm hoping what I want to do isn't going to be too difficult of a challenge for my first time.

 

Here is my first stab at it. Any correction or better way tips would be appreciated.

 

<set xpath="/quests/quest/reward[@type='exp']/@type">Skillpoints</set>   
   <set xpath="/quests/quest/reward[@type='skillPoints'][@value='*']/@value">1</set> 

 

-----------update-------------------

 

I got some help from dancapo with my syntax. I had the right idea but just didn't quite have it written out correctly. Hopefully I will come to learn this as I go. Here is the correct code.

 

<set xpath="/quests/quest/reward[@type='Exp']/@type">SkillPoints</set>
<set xpath="/quests/quest/reward[@type='SkillPoints']/@value">1</set>

 

As you can see overthought it and assumed that I had to first identify what the original value was before setting it to a new value and I was using the asterisk as a wild card for variable amounts of xp rewards from the various quests. But all that needed to be done was to specify what the new value should be for that reward type. I was so close and yet so far.... But now I feel ready to try my hand at a few other adjustments.

Link to comment
Share on other sites

My current project is trying to shorten the starter quest down to five tasks

 

Craft and Place Bedroll

Craft stoneaxe

Craft Club

Craft Bow and Arrows

Craft (but not place) wood frames

 

Last night I worked for a frustrating amount of time trying to get the quest to skip from stoneaxe to club so it would bypass the clothes making and wearing quests. I got the xpath line the way I thought it should be but it didn't work. So I tried several variations and then finally posted the one I thought was best on discord and asked for some critique and went to bed feeling like I wasn't understanding any of this at all.

 

Today I went on discord and saw my answer: I failed to capitalize one word.

 

All I could feel was relief that I at least DID understand the logic of the xpath and it was just a careless syntax error. whew! But it was a good lesson in checking for those small details instead of just assuming that I'm completely off base.

 

I also learned the importance of not doing too much at once. Make one change and check to see if it works then add another step otherwise finding the mistake is too hard. Maybe when I get better at it I'll be able to do things in larger chunks but for now its gotta be line check line check line check line check...

 

I am having a really hard time with the remove xpath. I want to remove the need to place and upgrade the wood frames. Has anyone removed lines from the xml using xpath that could share how remove works exactly? I tried doing it like append but just doing remove instead and it didn't work.

Link to comment
Share on other sites

I'd just "skip" it by editing the quest before it to point to the one after it, but...

 

<remove xpath="/blocks/block[@name=cntCar03SedanDamage0]/drop[@name=resourceLeather]" />

 

...so for mine I'm going deep into the blocks, but for yours, you could just point to the quest. I don't have the quest.xml handy but it would look something like:

 

<remove xpath="/quests/quest[@name=questname]"/>

Link to comment
Share on other sites

Think of each item in the "path" path/path2/path3/path4 as a "node", i.e.

 

<block>

</block>

 

...so by selecting something to DO with that "node", it does it to the ENTIRE node. So this remove will delete the ENTIRE node that has the node "quest" with a name that matches "questname".

Link to comment
Share on other sites

Okay thanks. I’ll give it a try. It’s like you said before—I’m generally understanding the logic but the syntax is killing me and it’s usually just one minor thing.

 

I also tend to want to be too specific. I was thinking I had to list the exact lines I wanted removed rather than just pointing to the node that contains those lines.

Link to comment
Share on other sites

I by no means have this crap memorized, so I'm constantly trial and erroring it. :)

 

Thankfully I've enough mods made that I can copy paste what I need from one to the other... I may not remember the syntax, but I can still remember what mod I did something similar in. :).

Link to comment
Share on other sites

Very good night! Everything I tried worked great. I better understand the remove xpath line now that I'm thinking in nodes as Guppy suggested.

 

I take it that xpath can't change the localization xmls because nothing looked like a node to me.... So I just changed my localization_quests file directly so that my new starter quest path pleasingly says 1/5, 2/5, 3/5, 4/5, and 5/5.

 

I am super proud of my new starter quest. It works exactly as I hoped it would. I think I over designed it because I orginally thought that if I changed all the names that that would be enough to have it go from 1-5 instead of skipping around up to 8. But it was good practice setting attributes to new attributes and removing others and appending lines and as I said it all went great.

 

At the end of the five quest chain you have 5 skillpoints (1 for each part) and the trader quest starts up just as it should. For those interested here is my xpath code (yes it is very over produced I'm sure). Just remember that if you want the messaging on screen to match as you go through the five tasks you have to change it in localization_quests as well.

 

<configs>
<!-- <This changes all quests in the game to give a skillpoint instead of experience /> -->
<set xpath="/quests/quest/reward[@type='Exp']/@type">SkillPoints</set>
<set xpath="/quests/quest/reward[@type='SkillPoints']/@value">1</set>

<!-- <This deletes the original quests 3, 4, and 8 /> -->	
<remove xpath="/quests/quest[@id='quest_BasicSurvival3']"/>
<remove xpath="/quests/quest[@id='quest_BasicSurvival4']"/>
<remove xpath="/quests/quest[@id='quest_BasicSurvival8']"/>

<!-- <This changes the remaining quests to become the new 3, 4, and 5 (or so I thought)  /> -->	
<set xpath="/quests/quest[@id='quest_BasicSurvival5']/@id">quest_BasicSurvival3</set>
<set xpath="/quests/quest[@id='quest_BasicSurvival6']/@id">quest_BasicSurvival4</set>
<set xpath="/quests/quest[@id='quest_BasicSurvival7']/@id">quest_BasicSurvival5</set>

<!-- <This repoints each quest to the next new quest in the altered chain /> -->	
<set xpath="/quests/quest[@id='quest_BasicSurvival3']/reward[@type='Quest']/@id">quest_BasicSurvival4</set>
<set xpath="/quests/quest[@id='quest_BasicSurvival4']/reward[@type='Quest']/@id">quest_BasicSurvival5</set>

<!-- <This alters quest five by removing the tasks of placing and upgrading the blocks and moves the final rewards and beginning of the trader quest to the new quest 5 /> -->	
<remove xpath="/quests/quest[@id='quest_BasicSurvival5']/objective[@type='BlockPlace']"/>
<remove xpath="/quests/quest[@id='quest_BasicSurvival5']/objective[@type='BlockUpgrade']"/>
<remove xpath="/quests/quest[@id='quest_BasicSurvival5']/reward[@type='Quest']"/>	
<append xpath="/quests/quest[@id='quest_BasicSurvival5']">
	<reward type="Quest" id="quest_whiteRiverCitizen1">
		<property name="chainquest" value="false" />
	</reward>
	<reward type="SkillPoints" value="1" chainreward="true" />
</append>

</configs>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...