builders_kit

Builders Kit

The builders kit available in the Marketplace provides numerous scripts that allow integration with AnE for inclusion in your own projects; some example scripts are provided to assist you in starting and you can always reach out in the group or message the creator for assistance in getting your project going. Presently what is included in the kit is the following:

The 'ane.stats' script will allow you to affect stats of a user in the region; there is an example script which you can simply, along with the ane.stats script, drop in a prim to test. Before continuing, this requires a basic understanding of SL events and JSON.

Stats are represented with percentages but their implementation is more involved than simply increasing or decreasing by a percentage. All stats are represented with points, the default being 1000 for each stat for every species as a baseline value (these will be defined by species owners and moderated by admins to ensure appropriate values are maintained); and are adjusted per profile/character by a ratio and then added or subtracted from. The baseline should be considered the average human expectation for vitality, defense, arousal, etc… vaguely meaning to use sensible values in your requests.

Profile modifiers or special items that may affect the profile stat ratio or addition and subtraction of values which will allow a character to deviate from the species baseline; this should be taken into consideration when designing your application. Assuming no deviations by using the default of 1000 points, if you want to take a characters vitality down by 25% or increase their arousal by 75%, you would send an amount value of -250 (-250 / 1000 = -25%) or 750 (750 / 1000 = 75%) respectively.

Few things to take into consideration is that the calculated affect applies to the existing stat value; so if the vitality stat is already at 40%, doing a hit for -250 (or -25%) will drop vitality down to 30% (25% taken from 40% leaves 30%); the other factor to take into consideration is that at this time, there is no way to adjust a stat percentage beyond the bounds of 0% to 100% (it has not yet been assessed what implications could arise from going out of bounds so values are capped); some stats are indirectly affected, such as increasing arousal will decrease defense for example, there is not a table which identifies these relations yet but something to keep in mind for implementation that may exist for the stat you are attempting to affect.

The 'ane.discover' script will allow you to find HUD user(s) in the region; the results come back as key/value pairs, with the user uuid as the key, and HUD object uuid as value. Additionally, other key/value pairs available are count and handle; handle being a custom string to help you identify the request if having other events coming back in linked messages.

The following channels broadcast JSON data; see the ane.broadcast.example script:

* integer CHAN_BROADCAST_SETTINGS = -1537921548;
* integer CHAN_BROADCAST_PREGNANCY = -1537921547;
* integer CHAN_BROADCAST_STATE = -1537921546;
* integer CHAN_BROADCAST_STATS = -1537921545;
  • builders_kit.txt
  • Last modified: 2022/03/26 02:55
  • by nuefox