• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[vJASS] LUA: Bonus, doesn't compile

Status
Not open for further replies.
Level 19
Joined
Mar 18, 2012
Messages
1,716
I wanted to install and import Bonus into a map of mine and ran into
unexpected problems

I keep on getting the error message:

//! external object merger $FILENAME$

Error while updating object data, ...

1. I ran the LUA_FILE_HEADER
2. I changed:
//! i local FILENAME = "FILE_NAME"
//! import "luajass.FILE_NAME.j"
to my desired map name.

3. I ran the installation script
4. I ran Bonus install script --> Error

What happens is that this line can't be compiled:
//! runtextmacro BONUS_CREATE_BONUSES()
If I uncomment this macro, I can save the map.

Anyone who can tell me what I'm missing?
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
You're better off using BonusMod.
Yes I decided yesterday to use BonusMod instead of Bonus.
It works great for me.
What exactly are you trying to do?

I solved already everything.

So this is what I was trying to do:

I just wanted to test if the installation of Bonus is easy to do. (for newcomers)
I updated my Equipment system (spell section) and added Bonus as optional requirement.
The idea was/is to attach any type of data to items and Equipment add/substracts it
automatically. Basically you can do:
  • Attach any real value (Item Power system I wrote)
  • Attach as many abilities as wanted (not so good as bonus, more useful for special effects)
  • Attach one special effect (can only cover special effects with 1 attach point name)
  • Attach any Bonus (new)
  • Check for Item Sets (runs automatically)
So you can do something like:
JASS:
        // Buckler
        //itemid |  icon | class | twohanded? | animationtag
        call Equipment_RegisterItem(Integers.buckler, 'A00R', Equipment_OFFHAND_CLASS, false, "")
        call ItemAddSpecialEffect(Integers.buckler, Strings.orcShield, Strings.weapon)
        call EnableItemEquip(Integers.buckler, Integers.rogue, false)
        call ItemPower_RegisterItem(Integers.buckler, 5, 10.)// Block Chance
        call ItemPower_RegisterItem(Integers.buckler, 6, 1.) // Min Block
        call ItemPower_RegisterItem(Integers.buckler, 7, 3.) // Max Block
        call ItemAddBonus('I00P', BONUS_LIFE, 10)              // Bonus
        //call SetItemMaxDrop(Integers.buckler, 2)

Bonus and BonusMod share the same API, so I will just add it as optional requirement
and place another static if.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
Most stuff on my GitHub hasn't been updated to new standards. On top of that, a lot of them are missing tutorials. They originally had information in the threads that showed how to install them. The stuff on GitHub is bare.

The Lua framework needs to be updated to be on a map by map thing rather than a computer by computer thing. This is so that projects can be properly shared between people. You can import scripts into a map from that map's directory or from the JASS directory ; ).

Really, there is a lot of work to be done. I'm sorry that you had such a terrible experience : (. That's just the state of most of my stuff at the moment. Even some of the stuff that has been updated is buggy. The only stuff that is totally compliant and includes tutorials and what not is the stuff in the Spells section by me.
 
Status
Not open for further replies.
Top