SRL Archive - Reflection Development

Reflection_ID.simba


Markus

2011-02-06 06:15:08

Hey,
All the different kinds of objects and animations got different ID's. Currently, every scripter has to grab those himself and if they change all the scripts need to be updated (not that they change that often, but I think it's too boring to grab all the ID's by hand :p).
So how about one big constant include?
Example:

//Reflection ID Include

//Objects
//Woodcutting
const
ref_obj_YEW_TREE = 1309;
ref_obj_YEW_STUMP= 7402;
//Mining
*insert here*

//Animations
//Skilling
ref_anim_CUTTING = 867;

//Items
ref_item_Knife = 946;

Just a suggestion, but it looks cool to my eyes :p

**BANNED The Man

2011-02-06 06:18:31

From: Markus
Hey,
All the different kinds of objects and animations got different ID's. Currently, every scripter has to grab those himself and if they change all the scripts need to be updated (not that they change that often, but I think it's too boring to grab all the ID's by hand :p).
So how about one big constant include?
Example:

//Reflection ID Include

//Objects
//Woodcutting
const
ref_obj_YEW_TREE = 1309;
ref_obj_YEW_STUMP= 7402;
//Mining
*insert here*

//Animations
//Skilling
ref_anim_CUTTING = 867;

//Items
ref_item_Knife = 946;

Just a suggestion, but it looks cool to my eyes :p


that would be huge, and as you said, if they change they would need updating, just the same as this.

-Boom

Sex

2011-02-06 06:36:20

If we can somehow get a raw list of everything and their IDs from the client we can then parse that and make this file automatically. I don't know if we would be able to differentiate the type though (as far as item, animation, etc.), but you know.

TomTuff

2011-02-06 06:49:37

I was talking to pyroryan a day or two ago, and he told me he could dump the price of every item in the GE without owning one via java. Perhaps a similar process could be done for objects, item, animation, and object IDs, and then parse the dumped file with some PHP code.

KingKong

2011-02-06 06:52:05

doesn't rsbot have a list of all(most) id of objects/npcs/animations, and i remember someone posted a txt file with all of the info.

**BANNED The Man

2011-02-06 06:53:03

See here:
https://github.com/SRL/srl-reflection/tree/master/Development

Sex

2011-02-06 06:57:43

Wtf? Is that generated automatically after every update? If so, I'll make a parser to put it all in a file like the one above. Or perhaps separated for more speed.

Gu3st...

2011-02-06 07:02:01

From: Dynamite
See here:
https://github.com/SRL/srl-reflection/tree/master/Development
Woah…

Also: 'Willow Tree', 'Willow Tree', 'Willow Tree', 'Willow Tree', 'Willow Tree', 'Willow Tree', 'Willow Tree', 'Willow Tree'.. There's sure a lot of different willow trees in-game :p
I'd hate to have to update every single one of them manually if I had written a script…

Sex

2011-02-06 07:09:03

Well iirc, there are a few types (like different looks?) of Willow trees and then * by the number of them because of just the trunks. However, there may be only one willow trunk object..

Naike

2011-02-06 07:43:23

Can you imagine the size of that include?

Sex

2011-02-06 07:47:30

Yes that was one thing..maybe a database online and then just retrieve what you want..? Cache it maybe? I dunno :p.

kitchenrange

2011-02-06 11:42:15

I doubt its worth it. There are so many Id's for the willow tree that most are location specific. So, you either have a tree finding function wasting time looking for trees in another city(even worse if you have it designed to walk to them), or you have to check the IDs yourself from your location. There tends to only be a few IDs per scripts used anyway. I like the idea, but I feel like it might not be worth the time and the results will be not where we want them to be.

E: Replace willow tree with whatever you want.

KingKong

2011-02-06 17:14:54

Then don't have id of objects that have multiple objects like willow trees in this case, and yeah, there isn't many ID's in a script so we could just use the online one to lookup, instead of grabbing it ourselves.

Echo_

2011-02-06 20:47:51

Looking through every single object and animation in RS and then recording them would take a really, really long time. By the time the entire file has been updated, a new update will have occurred and the process will have to be started again. Its better if individual scripters update their own scripts.

mormonman

2011-02-06 21:18:33

From: Echo_
Looking through every single object and animation in RS and then recording them would take a really, really long time. By the time the entire file has been updated, a new update will have occurred and the process will have to be started again. Its better if individual scripters update their own scripts.


They are actually cached. That is how the person on rsbot generated all of those id's.