ID:168717
 
I need a code that allows a user to change the graphic for a given object in the entire world, but only on his own server.

Thanks for even reading this. I am trying to find it myself.

Like edit anything in the worlds icon? or just an obj?
In response to Derekjeterisgod
Any icon. But only for the specific user, and globally.

You would load the icon from any file you wish, then the board would replace with that one.

... and it must come with a save feature to allow the icons to be reloaded anytime without much hassle...
I will write that for you. What will you give me in return?
there isnt a "Code"(a/The). please rephrase your question, =P
In response to Echtolion
No, there is code that will do it, and I can write that code.
Developous wrote:
I need a code that allows a user to change the graphic for a given object in the entire world, but only on his own server.

Thanks for even reading this. I am trying to find it myself.



obj
item
icon='i.dmi'
mob
verb
changeitem()
for(var/obj/item/I in world)
I.icon='ii.dmi'

you figure it out, im not explaining
In response to Echtolion
mob
admin
verb
Change_Icon(/obj/I in world) // Brings up a list of objects in the world for you to select to change the icon of.
I.icon=input("Choose an icon for [I]","[I] icon change") as null|icon // Select an icon from your system. Null adds an option to cancel so you don't have to dig through your system for an icon file just to get out of that stupid window. (That happens to me alot. Annoying.)
I.icon_state=input("Choose an icon state for [I]","[I] icon change") as null|text // Select a state from the icon file.

Perhaps that would work.

PirateHead, this isn't a trading code forum, he wants help, not a codetrade.
Echto, it would seem better to explain the function of your code so as to inform the person how it works so /he could improve it and make fixes, and know how to use it later on. And I believe the code you wrote would change all the /obj/item's in the world to a specific and unchangeable icon file, which may have multiple states.
In response to Sinoflife
Power of registered membership on overlords. 1 month.

When overlords is complete, that will be invaluable. See the gameplan post on the overlords forum for details.
In response to PirateHead
As Sinoflife said, The developer forums isn't a code trading center. They are here to help each other out with their codes. The developer how to forum is a part of the forums were you can ask how to do things in a certain way for free, so trading isn't allowed here.

Maybe you should refer to the Community Standards, and maybe read the rest to.

O-matic
In response to Developous
found out I don't really need it, but still a useful code.

Also, that code only affects one thing.
In response to O-matic
My point is that what he's asking has no simple answer. Writing the system that he requests into a game would take re-working some of the game's other code to make it all work, and from what I've seen from Developous I don't think he could handle it all himself without a lot of coaching. In any case, coming to this forum in search of that service is certianly absurd if he expects to get it for free.

Would the Community Standards prefer that I simply say "Look up the image() procedure"? I was nice enough to offer him help. I didn't say I wanted to code-trade. In fact, if he had offered me code in return, I would have refused. I would have done it for a thank-you card or recognition in his credits or even a few dollars on PayPal; all I asked was a little token of gratitude for the odd twenty minutes it would take me to write the code out for him and the odd half-hour it would take to explain it to him.

Thanks for your concern.
In response to PirateHead
PirateHead wrote:
My point is that what he's asking has no simple answer. Writing the system that he requests into a game would take re-working some of the game's other code to make it all work, and from what I've seen from Developous I don't think he could handle it all himself without a lot of coaching. In any case, coming to this forum in search of that service is certianly absurd if he expects to get it for free.

Would the Community Standards prefer that I simply say "Look up the image() procedure"? I was nice enough to offer him help. I didn't say I wanted to code-trade. In fact, if he had offered me code in return, I would have refused. I would have done it for a thank-you card or recognition in his credits or even a few dollars on PayPal; all I asked was a little token of gratitude for the odd twenty minutes it would take me to write the code out for him and the odd half-hour it would take to explain it to him.

Thanks for your concern.

A few dollars? Think that's a bit much for a little bit of code? I honestly can't see what he's asking, but what I wrote covers a part of his request, the ability to change an object in the world's icon. And anyways, I could buy LUNCH with a few dollars. You could simply write the code and explain the function in comments, give him your email adress or something and tell him if he doesn't understand, to email y ou. I'm sure he would give you a thank-you. What I meant by code-trade, was that you write him the code and he gives you whatever, like an icon or something. Telling him to "look up the image() procedure" would be another thing to do, yes, in fact many people do similar things when people ask questions like this. I don't think the code would be a "system", anyways. Again, what I wrote was pretty much all to most of his request from what I understand, and if he meant that only the host could have the verb, or admin, simply make a mob type(admin)(as I put in my code), and then make a list of admins and do something such as:
if(locate(src.ckey)in adminlist)
src.verbs+=typesof(/mob/admin)

(I'm aware that's most likely a crude way to do it(even though it works), but I'm using it as an example)
You're not god because you're offering him help. And I don't think I've seen anyone on here offer money or something for some code snippet, or even system. People here do it for free, from what I've seen.
In response to Developous
Developous wrote:
found out I don't really need it, but still a useful code.

Also, that code only affects one thing.

mob
admin
verb
Change_Icon()
var/I=input("Choose an icon for all objects in the world.","All objects icon change") as null|icon
var/I2=input("Choose an icon state for all objects in the world","All objects icon change") as null|text
for(var/obj/I3 in world)
I3.icon=I
I3.icon_state=I2


I meant it to select one object, because I thought that was what you meant.
In response to PirateHead
Piratehead wrote:
In any case, coming to this forum in search of that service is certianly absurd if he expects to get it for free.

Do a forum search, and see if you can find someone that asked money for giving out -optional- help. And I don't think its much of a problem to give out a few minutes to help him out.( I will remember your lines for when you need help >:|). If you really don't want to do it for free then make a library and require a subriction to download.

Would the Community Standards prefer that I simply say "Look up the image() procedure"?

Thats one of the ways to help. However I didn't link you to the communty standards for that reason, I linked you there because the way you were offering him help wasn't very good (I'm pretty sure that it's against the dev. forums's rules).

I was nice enough to offer him help. I didn't say I wanted to code-trade.

Offering help is good, but you did ask to get something in return and that is trading. If you don't want to do it for free then simply don't

In fact, if he had offered me code in return, I would have refused. I would have done it for a thank-you card or recognition in his credits or even a few dollars on PayPal; all I asked was a little token of gratitude for the odd twenty minutes it would take me to write the code out for him and the odd half-hour it would take to explain it to him.

A "Thank you" is always on its place. but don't expect him to pay you just because you gave him a little help with some code.


O-matic