Page 4 of 7

Re: Basic Scripting and Editor Help(Basic Script Reference)

Posted: Sun Oct 19, 2014 2:00 pm
by A100N
Hello all (sorry I use a translator)

Looking for help on the merits the scripts :(
namely,

*** I have 3 altars, and I want that when placed on each of them corresponding object automatically been opened one of the doors, ***

  Unfortunately, a lot of scripts game changed in August compared with the earlier ver of this game and already can not keep anything that would Find an :( helped me

So if someone would be so kind and wrote me these few lines of code how it should look ??
Thanks in advance for your help ...

Re: Basic Scripting and Editor Help(Short Script Reference)

Posted: Mon Oct 20, 2014 5:57 am
by Rubilax
SnowyOwl47 wrote:-snip-

Code: Select all

startMessage = spawn("scroll")
startMessage.control:setScrollText("text")
party.party:getChampion(1):insertItem(11,startMessage)
Giving your code a go and this is all I get. http://gyazo.com/57da681d0ee613ccd68c11e5679aece0

Just to reiterate, this is a floor_trigger that is activating the script after a short delay that gives the player a note in their inventory with predefined text, along with a hudPrint to alert them to this.

Re: Basic Scripting and Editor Help(Short Script Reference)

Posted: Mon Oct 20, 2014 5:59 am
by SnowyOwl47
@Rubilax

My Bad,

Code: Select all

startMessage = spawn("scroll")
startMessage.scrollitem:setScrollText("text")
party.party:getChampion(1):insertItem(11,startMessage)
its startMessage.scrollitem I decided to check it out in the editor but the one thing I don't know how to do is add the item to there inv ill get back to you on that

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Mon Oct 20, 2014 11:02 am
by NutJob
Terribly sorry to point this out (really don't want to hurt anyone's feelings) but these tutorials/examples really shouldn't be stickied to this forum. There's a lot of misinformation and the scripts are amateurish, at best. Perhaps best to wait until there's some solid development references.

Someone had to be the fall guy. ~shrugs~ Sorry, all the same.

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Mon Oct 20, 2014 2:03 pm
by NutJob
Use a connector (can't be called without a trigger)

Excessively simple example:

Connector on a floor_trigger

Code: Select all

function dagger_to_the_eye()
	party_member_one = party.party:getChampion(1)
	fancydagger = spawn("dagger");
	party_member_one:insertItem(20, fancydagger.item)
end
Of course you'll want to iterate through the backpack slots (and/or character slots) to make sure the space is empty, of the right type of slot, etc; do some conditional testing; and lastly write in a fail safe (such as drop the item on ground instead if all slots are full).

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Mon Oct 20, 2014 3:40 pm
by SnowyOwl47
@NutJob I don't see what your problem is...
Lots of people find it helpful and they ask questions here just because it did not help you, doesn't mean it did not help anyone else. And, I've tested all of these methods and everything they're all working and if you don't like the way there laid out well then I'm sorry because I simply don't have enough time to make everything as easy as cake to read even though it is pretty easy to read.

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Mon Oct 20, 2014 10:45 pm
by sapientCrow
Is there a method to run a console command to add a multiplier to experience gains and will it run through the entire game session as long as I do not quit out of the game?

I would like to play a solo game at some point and increase the exp gain so I can gain more skills.
I would rather not just add in skill points or dump a large amount of exp on the champion.
thanks

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Mon Oct 20, 2014 10:52 pm
by SnowyOwl47
sapientCrow wrote:Is there a method to run a console command to add a multiplier to experience gains and will it run through the entire game session as long as I do not quit out of the game?

I would like to play a solo game at some point and increase the exp gain so I can gain more skills.
I would rather not just add in skill points or dump a large amount of exp on the champion.
thanks
Not that I can see but if you look at my easy scripting code you can see I started work on it, very complicated proccess make take a while.

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Mon Oct 20, 2014 11:21 pm
by sapientCrow
ok thanks.

I do not understand why they do not allow for the ability to override some of the core rules and formulas more easily.
I do not even see a way to alter attributes or add abilities to items in the editor itself.

Re: ~Basic Scripting and Editor Help(Easy Scripting Updated!

Posted: Tue Oct 21, 2014 5:40 am
by Isaac
sapientCrow wrote:ok thanks.

I do not understand why they do not allow for the ability to override some of the core rules and formulas more easily.
I do not even see a way to alter attributes or add abilities to items in the editor itself.
I don't understand why they ever would... :?

(They include the mod tools for people to mod what they like in their own maps; but I can't imagine allowing that in their official campaign. They likely balanced the game based on the predicted limits of the PCs.)

**If there is a Party hook for XP gains, then such a hack could probably work in a modded map; but I don't think (certainly don't know) if you can hook to that via console script in the running game; as would have to be done to patch the LoG2 campaign.

*** If there isn't such a hook, it's not a bad thing to ask for in a future patch or one of Petri's glögg sessions.

Once the scripting reference is made public, you could choose to add extra points at times when they level up... If you wanted a 20% xp bonus... just add 20% of their current XP after they level up; or (if possible) add the points directly after they level up, but before you've spent them.