View unanswered posts | View active topics It is currently Mon Jan 13, 2025 8:20 pm



Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3
 CCRPG Revamp. 

Should I revamp it?
Yes. 100%  100%  [ 8 ]
No. 0%  0%  [ 0 ]
Total votes : 8

 CCRPG Revamp. 
Author Message
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post 
Here's a sloppy example of how I think it'd work well. Then we could just have it autosave the player tree of everyone(because player = will be your default mob). Thus people's custom units would be saved.


Code:
mob
<tab>player // Makes the player mob
<tab><tab>var
<tab><tab><tab>♥♥♥♥ = 0
<tab><tab><tab>goes = 0
<tab><tab><tab>here = 0
<tab><tab><tab>cash = 0 // Cash that is deducted when unit is made
<tab><tab>verb
<tab><tab><tab>makeunit(T as text) //The makeunit verb. T as text is because I was going to add J.name = "[T]" under J.variable3 but I'm too lazy etc. This just makes a text input window
<tab><tab><tab><tab>var/mob/customunit/J = new (locate(src)) // Makes a customunit mob which has blank variables by default where the player is
<tab><tab><tab><tab>J.variable1 = src.customunit1.variable1 // Sets all it's variables
<tab><tab><tab><tab>J.variable2 = src.customunit1.variable2
<tab><tab><tab><tab>J.variable3 = src.customunit1.variable3
<tab><tab><tab><tab>cash -= (J.variable1 += J.variable2 += J.variable3) // Deducts cash by adding the variables. You can make your own damn complicated algorythm.
<tab><tab>customunit1 // Here stores the first custom unit's variables. I'd code a verb that sets it's variables but YOU GET THE IDEA.
<tab><tab><tab>variable1 = 1
<tab><tab><tab>variable2 = 5
<tab><tab><tab>variable3 = "NOBODY CARES JUST PRETEND SOME RANDOM ♥♥♥♥ NUMBER IS HERE"
<tab><tab>customunit2 //Customunit2's variables are set
<tab><tab><tab>variable1 = 2
<tab><tab><tab>variable2 = 5
<tab><tab>customunit3 // 3's, etc
<tab><tab><tab>variable1 = 3
<tab><tab><tab>variable2 = 5
<tab>customunit // The blank unit
<tab><tab>var
<tab><tab><tab>variable1
<tab><tab><tab>variable2
<tab><tab><tab>variable3
<tab><tab><tab>variable4


Wed Jul 11, 2007 3:34 am
Profile

Joined: Mon Dec 04, 2006 3:34 am
Posts: 2378
Reply with quote
Post 
Well, I wanted to not have a stupidly long list on stuff in the code.
Idea runs strangely. Try to follow code or the explanation or both.

Code:
mob
[]Infantry Template
[][]var
[][][]MaxHP = 0
[][][]HP = 0
[][][]Etc? = 0

obj
[]Infantry Placeholder//name goes here amirite?
[][]var
[][][]name = null //this is IMPORTANT
[][]verb
[][][]Spawn() //called when the mob is made
[][][][]var/mob/Infantry Template/J = new (locate(src))
[][][][]J.MaxHP = readline(find(<pathtofiles>\'usr.name()Infantry.txt', 'src.name')) /* you get the idea? It searches the file where the vars are saved for the name, reads the next line, which is the MaxHP, so on and so forth to fill out the template.  There's probably a better way, and this is making ♥♥♥♥ up, but I'm just saying that this is the general theory. */


Wed Jul 11, 2007 4:05 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page Previous  1, 2, 3

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.072s | 16 Queries | GZIP : Off ]