Need "award EXP script"
-
- Posts: 3
- Joined: Wed Oct 17, 2012 6:59 am
Need "award EXP script"
I tried searching but I can't find a script to award experience points. Making a dungeon and I don't think It'll have much combat so I would like to award exp for solving puzzles and finding secrets. Scripting eludes me completely.
Re: Need "award EXP script"
All you need is:
slot is player #1-4
lots more in the reference:
http://www.grimrock.net/modding/scripting-reference/
Code: Select all
party:getChampion(slot):gainExp(amount)
lots more in the reference:
http://www.grimrock.net/modding/scripting-reference/
-
- Posts: 3
- Joined: Wed Oct 17, 2012 6:59 am
Re: Need "award EXP script"
Yeah I keep looking the reference over, but I'm just completely lost when it comes to stringing things together. But thanks for that help. Now I just need to see how to make it stop awarding it each time my puzzles are done, or simply a one shot when stepping on a plate.
-
- Posts: 59
- Joined: Sun Oct 14, 2012 7:13 am
Re: Need "award EXP script"
Being a similar coding newbie, I have trouble stringing things together myself. I'm more of a "chop-shop coder" since I haven't found any tutorials for any language that details more than one subject per tutorial. "In this tutorial we're going to cover Variables; next time, Lists!" you know? Nobody does a "Now that we've covered variables, lists, and for/while loops, I'll show you how to tie them together!" kind of tutorial.
You might try a "self.destroy" after awarding the XP, but I can't guarantee that's the correct code, or that it'll work. Like I said, coding newbie.
You might try a "self.destroy" after awarding the XP, but I can't guarantee that's the correct code, or that it'll work. Like I said, coding newbie.

Re: Need "award EXP script"
I learn best from examples, so you might try working through a few of the basic scripts in the script repository, that will definitely help you get a better feel for how to tie things together
Finished Dungeons - complete mods to play
-
- Posts: 35
- Joined: Fri Jun 15, 2012 7:31 am
- Location: Germany
Re: Need "award EXP script"
Here is a beginnersguide, looks promising. Should be exactly what you asked for Szragodesca.
-
- Posts: 59
- Joined: Sun Oct 14, 2012 7:13 am
Re: Need "award EXP script"
I'm not a book learner, I learn best through observation. I see something as it's done, whether it's explained or not, and as I see the actions taken to reach the final result my mind slips all the pieces into place. Looking at finished code (for me) is like looking at a finished game of Go and trying to figure out where they started and what was in the middle because, while the result works, it isn't as important as the path to reach it was. (Go is all about the strategy involved, not so much who won or lost as how they played the game. My brother's an addict. . .
)
I'll try to get the asset pack while here at work tonight. . . it's too big for me to download at home until the weekend.
{Edit:} I'll give the guide a look-see Loll, thanks.

I'll try to get the asset pack while here at work tonight. . . it's too big for me to download at home until the weekend.
{Edit:} I'll give the guide a look-see Loll, thanks.
-
- Posts: 163
- Joined: Fri Sep 14, 2012 6:20 pm
Re: Need "award EXP script"
I fired this script for granting XP, for instance when a key is used to unlock a door etc.
I know it can be shortened with a loop, but in it's basic form it works fine, and you can easily change the figures to grant differing amounts to different chr.
I know it can be shortened with a loop, but in it's basic form it works fine, and you can easily change the figures to grant differing amounts to different chr.
Code: Select all
function exp1()
party:getChampion(1):gainExp(250)
party:getChampion(2):gainExp(250)
party:getChampion(3):gainExp(250)
party:getChampion(4):gainExp(250)
hudPrint("Progress Made : 250 XP Bonus")
playSound("secret")
end
Re: Need "award EXP script"
Code: Select all
for i=1,4 do party:getChampion(i):gainExp(250)

Try my Mordor: Depths of Dejenol LoG-ification. Feedback much appreciated!
Re: Need "award EXP script"
Wolfrugs is perfect. This is the complete script, hook it to whatever u like.
(supposed to be an indent on the first "end", wont show in this format 
(Komag - fixed code format)
Code: Select all
function exp()
hudPrint ("Gained 250 exp.")
for i=1,4 do
party:getChampion(i):gainExp(250)
end
end

(Komag - fixed code format)
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades