Ok so i want to place an item to my world, hidden of course away in some dark depressing place....
that is just 1 single item, that only 1 player can have (unless the game is pwiped ofcourse)
So I assume, and yes I do mean I'm assuming...
That i would just place the item and dont code in a respawn proc for that item...
but how would i make this item immune to world repop? how would i make it so it remembers it was taken by said player?
and how would I go about making it useful to said player?
Would I just add verbs upon pick up? Would that be the most efficient way?
Any suggestions?
ID:155542
Jun 3 2011, 5:13 am (Edited on Jun 3 2011, 7:35 am)
|
|
When it comes to "rare" items, I'd assume you really want them to be, rare.
What I would more than likely do myself, would be one of two ways: Simplistic : Assign certain /turf or /area to become "possible holders" of the item, and the item is located randomly in one of the possible areas. Now, this gets a bit tedious because players could figure out the exact locations of possible spawn points. Complex : Design and develop a system with environment-analyzing function which grabs the /turf, /area, /mob, /obj around it, and calculate given how popular the area is (hence /mob, and /obj) as well as determine whether it can spawn somewhere dense or visually hidden behind a /turf or /area. I would go more towards the Complex method, but the Simplistic can suffice, so you don't have to go and spend some odd minutes debating in the map-editor where you want to place it. You can also have it so that the item is initially invisible, and only becomes visible if a player is within certain tiles of the item. This sort of magic requires client.images, get_dist(), etc. I'm also going to go along with King_ed and advise you to make the item temporary, if you can. As in, the item only lasts until a certain time (minutes, seconds, hours, etc.) and/or a certain event (death, log-out, world.repop, etc). This way, one simply cannot starve the other players of in-game content that is available to them. If it's something that doesn't hurt the player, and only helps them, I would just have an auto-pickup function for it. Where the player can either bump, or stand on it and the thing's affect will execute or they will obtain the thing. As far as world.repop goes, only atoms that have been "destroyed" or "deleted" will be respawned. If an item still exists, it won't be respawned. So, you should be safe, in theory, if you never delete the item but only re-locate it once it's purpose is served to a player, and another won't show. |
I would make this rare item as a drop from a massively hard boss - after all, the item is ...unique. Or have a room open post the defeat of a boss...
Either way, what I would do is have a container in that place of yours, be either a boss, a chest or even a patch of dirt. When the person attempts to collect the item, check if the rare item was already collected by someone (have a variable which checks if the item was taken and save/load it every time the world ends/starts). If the variable is false, the person can collect the rare item (or make it that they have a prob()ability of getting the item). For example var/ancient_item = 0 |
In response to Mr. Robert
|
|
I like the simplistic idea and complex idea so going to meet it half way...
Possible make loads of possible locations for the item to spawn, and it will randomly choose so each time the world is rebooted(or upon admin//Login//Logout, unless someone has it already. Hows that? And i dont want the item to be temp, i want it to always exist and be hidden away, as to only a person who is really wanting to find it, and is skilled enough is going to reach it. My spawn locations i guess you could say will be hidden deep within my world :P And the item needs to be "obtains" obviously you cant control it unless skilled enough as well, so just knowing where its located will not grant the player access to it. Thus having the random spawn locations(or not so random) would be great. A player wouldn't be able to track down all the locations and nor would they know thats how it was done unless of-course they read this message :d Also this is an item that will never disappear, relocate, or be taken away via combat from its finder. Yes it will over power the person who find its, but there are others like it. Plus i want to make it so that a player can only have 1 type of rare item...so i assume just a made up rare var will do... |
In response to King_ed
|
|
I like that idea, but i was going along the lines of the object not being a weapon but being a power booster. I want it to give an ability as well as a increase in power for the player who finds it.
I'm not simply moving it into their inv, for them to wield. It will simply be attached to them,(variable wise)once they find it....but i dont wanna drag it along with them, or store it in their inventory for the rest of the time...it needs to be...how do i say.."Not exist, but exist at the same time?" |
In response to Komuroto
|
|
But what you have to watch out for is if the player who finds it gets banned or wiped.
|
I'm not sure I quite understand the problem, but perhaps keep variables for whether given items are collected. Save those variables in the save file and, if they are set, don't respawn the item after a repop.
If you want the item to be available again if the player who collected it is destroyed, perhaps put a line that resets rare items in the player's del function, or when seeing if the rare item needs to be respawned, check every player's inventory to see if it's there. |
But i am good with ideas and this is quiet a good one.
If i was you i will make that object give speical verbs to the player who has the object. For example whoever gets that object gets a speed boost for 1 minuite when activated or when activated it makes the player who has it invisible for 20 seconds.
These are just some of my ideas, i am just trying to help =D