Page 200 of 400
Re: Ask a simple question, get a simple answer
Posted: Thu Apr 13, 2017 4:37 am
by minmay
Haha, no big deal, I realize now that I sounded pretty mean there. That indentation
was really bad though

Re: Ask a simple question, get a simple answer
Posted: Thu Apr 13, 2017 4:45 am
by akroma222
minmay wrote:Haha, no big deal, I realize now that I sounded pretty mean there. That indentation
was really bad though

All good big chief, the indents were indeed an Abomination!
Id messed around with it when I was first trying to wrap my head around how those shadow functions are set up and Id forgot to correct them
(Can you tell I was initially Confused??

)
Re: Ask a simple question, get a simple answer
Posted: Thu Apr 13, 2017 4:49 am
by minmay
Yeah, that one was a quick example and not very readable...I think I'll make a separate thread about this.
Re: Ask a simple question, get a simple answer
Posted: Thu Apr 13, 2017 5:03 am
by akroma222
So far Ive collected up:
--The Explanation - Overwriting standard functions in the global environment (info dump)
--The Map Marker example (that follows the explanation^)
--The custom Award XP example (linked^^)
--The MonsterAttack pierce examples (posted above)
(...you should see mockery I made of the indentations for the other examples!

)
I kinda get it now - but yeah a new Thread for Shadowfunctions would be v useful for folks
I will put together something for the ^^aforementioned monster attack Counter stuff I had in mind soon
Im pretty sure I canwork from the Monster attack Pierce example to do this

Re: Ask a simple question, get a simple answer
Posted: Fri Apr 14, 2017 11:29 am
by Smok
How to setup default partry?
Re: Ask a simple question, get a simple answer
Posted: Fri Apr 14, 2017 7:20 pm
by zimberzimber
Smok wrote:How to setup default partry?
You'll have to create a function that changes each champions values to those you'd like to have, and launch that function
after the party is created in game. (i.e put a floor trigger under the parties starting position that calls that function from a script entity)
Here is a list of champion related functions
Re: Ask a simple question, get a simple answer
Posted: Sat Apr 15, 2017 12:53 pm
by Smok
zimberzimber wrote:
You'll have to create a function that changes each champions values to those you'd like to have, and launch that function
after the party is created in game. (i.e put a floor trigger under the parties starting position that calls that function from a script entity)
Here is a list of champion related functions
But how can i chceck if player choosed to create party or to go default.
I have nother question. Can i exclude races/classes/skills/spells/recipes etc. i don't want from my addon? Lets say I want to change setting a little.
Re: Ask a simple question, get a simple answer
Posted: Sat Apr 15, 2017 5:41 pm
by zimberzimber
But how can i chceck if player choosed to create party or to go default.
Your only option is to compare all values (names, starting traits, skills, race, etc...) for every champion with those the default party has.
I have nother question. Can i exclude races/classes/skills/spells/recipes etc. i don't want from my addon? Lets say I want to change setting a little.
If you want to modify an already present trait/class/anything else thats already defined, you can just define it again with the new values you want.
Want the Berserk to grant +10 strength per level? Copy its definition (found in the
vanilla asset pack), and change values at will. Make sure the name (Not the uiName) stays the same.
You you want to
remove a definition, you'll have to make some adjustments to whats being initialized. If you take a look at your init.lua, you'll notice the first (probably) line is 'import "assets/scripts/standard_assets.lua". That is a script file that initializes all the base game definitions.
You can't modify it, but you can remove the "assets/scripts/standard_assets.lua" line in your init.lua, and copy everything you need from standard_assets.lua, into your init.lua (or another file that gets initialized before any other file) (standard_assets.lua can be found in the vanilla asset pack as well)
Re: Ask a simple question, get a simple answer
Posted: Sun Apr 23, 2017 9:07 am
by zimberzimber
How do I use 'Console.suppressWarnings'?
Tried multiple ways, all ended up with an error.
Re: Ask a simple question, get a simple answer
Posted: Sun Apr 23, 2017 9:40 am
by Zo Kath Ra
zimberzimber wrote:How do I use 'Console.suppressWarnings'?
Tried multiple ways, all ended up with an error.
The correct function name is:
Console.setSuppressWarnings
Found with
Code: Select all
for key,value in pairs(Console) do print(key,value) end
Console.setSuppressWarnings(true) <-- warnings off
Console.setSuppressWarnings(false) <-- warnings on