Search found 52 matches

by Marble Mouth
Sun Mar 24, 2013 8:19 pm
Forum: Modding
Topic: New Spells >> show them off here
Replies: 207
Views: 267682

Re: New Spells >> show them off here

Edit: I was responding to a post that has now been deleted... Hi akroma222. I would hardcode a table containing the names of all the ammunition types, in the order that you want to cycle through them, for example: ammoCycle = { "rock" , "throwing_knife" , "arrow" , } Si...
by Marble Mouth
Sat Mar 23, 2013 2:45 pm
Forum: Modding
Topic: Stack overflow
Replies: 4
Views: 4086

Re: Stack overflow

Hi Retwulf. I agree with Neikun that we could probably be more helpful with a more specific example. FYI, stack overflow in lua most commonly occurs in "infinite" recursion scenarios, but not all "infinite" recursion results in stack overflow. Unfortunately, the deciding factor i...
by Marble Mouth
Fri Mar 22, 2013 3:58 am
Forum: Modding
Topic: Requesting some specific helpful tips
Replies: 35
Views: 29762

Re: Requestion some specific helpful tips

Hi Aleitheo. I see some good advice in this thread, but I don't actually know if you're comfortable with scripting. So that's my first question: have you ever created a script_entity in your mod and gotten it to do something? Secondly, this is a slightly more advanced scripting concept, have you eve...
by Marble Mouth
Fri Mar 22, 2013 2:10 am
Forum: Modding
Topic: Iterators
Replies: 8
Views: 6875

Re: Iterators

Ah, thanks Xanathar. You're right, the version of findEntityAnywhere that I posted above won't find items inside containers on the ground, but it will find items in alcoves. Also, I didn't account for nested containers because originally I only tested with wooden boxes, which don't nest. Oh well, I ...
by Marble Mouth
Fri Mar 22, 2013 12:35 am
Forum: Modding
Topic: Iterators
Replies: 8
Views: 6875

Re: Iterators

I did find an... issue. I don't know if it's a bug. Suppose you have a crafting item (e.g. a mortar.) And that crafting items contains all the ingredients for a valid recipe(e.g. a flask and a tar_bead.) And now you can see the ingredients at the top, and the result (e.g. a Healing Potion) at the bo...
by Marble Mouth
Thu Mar 21, 2013 1:37 am
Forum: Modding
Topic: Iterators
Replies: 8
Views: 6875

Iterators

Hi everyone. Previously, I wrote a redefinition for allEntities to avoid a certain bug that was identified with the standard definition. I have also written some non-standard iterators for situations that I see discussed frequently on here: Edit: There are some flaws with the code in this post, but ...
by Marble Mouth
Fri Mar 15, 2013 2:56 am
Forum: Modding
Topic: onEquipItem crash
Replies: 3
Views: 4315

Re: onEquipItem crash

Hi Duncan_B onEquipItem = function() script_entity_7.itemCheck() return true end --onEquipItem = function(champion, slot) -- for champ = 1,4 do -- for slot = 7,8 do -- party:getChampion(ch):setCondition("poison", 30) -- return true -- end -- end --end --this commented-out onEquipItem secti...
by Marble Mouth
Fri Mar 15, 2013 2:37 am
Forum: Modding
Topic: Special Weapon Scripts + [ASSETS] weapons/armour/acc/herbs
Replies: 34
Views: 30720

Re: Special / Magic Weapon Scripts Thread

akroma222 wrote: I will implement this and if OK with you, update the original post with your (creditted) code..?
Oh, absolutely. I share this stuff in the hopes that it'll be useful :)
by Marble Mouth
Fri Mar 15, 2013 2:28 am
Forum: Modding
Topic: Needin' some table education & 2 questions
Replies: 6
Views: 5328

Re: Needin' some table education & 2 questions

PosistionTable = {12.16, 12.17, 13.18} etc, etc. Unfortunately, these will be interpreted as decimal numbers e.g. 12.16 == ( 1216 / 100 ) . As usual, there are many ways to write the code to implement this functionality. Here's one way: PositionTable = { { x = 12 , y = 16 } , { x = 12 , y = 17 } , ...