Jump to content

Photo

Attack Ring


  • Please log in to reply
36 replies to this topic

#31 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 03 August 2013 - 09:32 PM

LWeapon->Misc[] and ItemData->Attributes[] are two different things.


Where is this documented? I looked for information on this int he Wiki pages a while back, and only found the Item Misc Attributes information; I presume then, that the only way to put any value into weap->Misc is via a script, and then you can read it back?
 

Also, please use [ hidden ] tags (without the spaces) around your script so it doesn't fill up the page.


If this was a non-scripting forum, I could see the point, but to be plain, I hate hidden tags, both for posting, and especially for reading.`Not only do they serve no purpose, as if I am going to read a discussion in a scripting forum, I am likely to read the code in entirety while doing so, but I had also experienced several instances in different browsers of the javascript failing, particularly on my mobile. Just try to save a script on your mobile to transfer to a laptop via an SD card later that you cannot even view because the encapsulated hidden tag function doesn't work. I went through that with a script that you sent me in a PM, and I had to view the page source and extract it to gain access tot he script that you sent to me, just because of a bloody [ hidden ] tag that refused to operate.

 

The new interface also persists in changing my [ code ] tags to [ code:=auto ] and destroys my formatting if I click edit even one time; so I manually go through in editor mode, to re-set every tag on every post that I make



#32 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 August 2013 - 09:47 AM

Wow, I had no idea hidden tags are such trouble for you! I guess you should report that in site bugs if you haven't already.

You can look up just about anything built into ZScript in ZScript.txt, packaged with ZC.

#33 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 August 2013 - 08:58 AM

I didn't bother reporting it because it's going to be impossible to properly debug and remedy. Mobile browsers, and Linux browsers have inherent differences, and some JS functions break; they can also break when using script protection packages (e.g. NoScript) even with site permissions set to positive.
 
This has to do with the new forum engine, and nobody is going to want to try testing and debugging it all on a variety of platforms and browsers.
 

This is the confusion that I found in Zscript.txt:

 

    * An array of 16 miscellaneous variables for you to use as you please.
    * Note that lweapons and eweapons possess exactly the same attributes, * although their designation affects how they are treated by the engine.
    * The values here correspond to both the lweapon and eweapon type.
    */
    float Misc[];
    
}; //item

/**
    * An array of 16 miscellaneous variables for you to use as you please.
    */
    float Misc[];
    
}; //weapon

When I look up Item Misc. Attributes in the Wiki, the information given seems to correlate, but also seems to contradict this, as it states that the Misc attributes of an Item change based on the item class. I had no idea that these were two different sets of misc. attributes. I merely thought that this was the appropriate way to utilise the misc. attributes of an item in Zscript... :(

 

The fact that the Wiki doesn't contain information on this also put me into believing that the arrays for Item[Misc] and Weapon[Misc] are identical in all aspects. The Zscript.txt doesn't indicate that these are two isolated and separate arrays, nor does it specify that they are connected in any way.

 

While I expect that those well-versed in C might expect to understand everything in the .txt docs, people who aren't C-programmers need some form of example code, to use as a guide to actually understanding now only how a function works, but how to properly use it, and why it works.

 

This particular ability isn't well documented anywhere else, to my knowledge, and straightforward working examples of using it aren't readily apparent, compounding my confusion.


Edited by ZoriaRPG, 06 August 2013 - 09:07 AM.


#34 justin

justin

    Adept

  • Members

Posted 13 December 2014 - 07:47 PM



Okay, plan C: Attach this script to a normal Whimsical ring, with chance 1 and damage bonus whatever (not 255, probably). That will force it to affect swords. Then for the script, take everything out of the old one and use this (and only this one, not parts of the old ones mixed with it):

 

Updated script again

 

 

bolded text - which script should be attached to the whimsical ring to make it affect swords?

 

and, sorry for the gravedigging.  just that i've been working on something like this...



#35 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 13 December 2014 - 08:08 PM

The item script. The other one is a global script and can't be attached to the whimsical ring. You can change an item's power directly with itemdata pointers, though, so the whimsical ring seems unnecessary.



#36 justin

justin

    Adept

  • Members

Posted 13 December 2014 - 08:17 PM

The item script. The other one is a global script and can't be attached to the whimsical ring. You can change an item's power directly with itemdata pointers, though, so the whimsical ring seems unnecessary.

 

ok, was confused by that.  since it was a pickup script.  i thought the script attached to the whimsical ring would have had to be an action script so that it affect swords.

 

i guess MM's solution was to have the whimsical ring itself affect swords, and at the same time change that damage modifier to affect non-sword weapons.



#37 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 14 December 2014 - 06:28 PM

That was pretty much the idea, yeah. Actually, I'm glad this was brought back up, I've been wondering about making an item that gives a TEMPORARY attack boost (as well as screwing with the movement controls for the duration), could this script be edited to do such a thing? Maybe by adding the whimsical ring to the inventory temporarily so the multiplier could affect swords?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users