Mod Help - Getting a Compass's code

Mod Help - Getting a Compass's code

Postby ZeroKnight » 28 Aug 2011, 23:27

First, some background. My Extended Compass mod will have a GUI editor that will allow Compass creation via GUI. I can do this fine with the current GUI creation and alias creating, but the problem is they wont be saved, as aliases are not remembered between sessions, which would mean the user would have to re-make the compass every launch, which is obviously not acceptable. I decided that the GUI aspect would be a separate download, as I've concluded it will require a source modification.

What it will entail is a new function, "writeECdata()", which will get the code that makes up a compass, and write it to a file (ecdata.cfg), which will be loaded on startup like config.cfg and autoexec.cfg. However, I'm unaware of how to GET the code that makes up a compass. (For the following examples, the compass's name is "Talk") I've tried a few tricks like "echo (getalias Talk)", and "echo Talk", but they only return blank lines. I think it's because it's trying to return the compass itself, and not it's code, which is why it's only returning a blank line.
Is there a way, be it CubeScript or inside the game code to get the value of a Compass? For clarification, I need the code that makes the compass, ie:
{l Code}: {l Select All Code}
newcompass Talk "textures/voices" [
    compass "Thanks!"               [say "^fgThanks!"]
    compass "Hello!"                [say "^fgHello! :D"]
    compass "Balance Teams!"        [say "^fyPress F7 ^fcto Balance the Teams! ^frAUTOBALANCE IS BROKEN!"]
    compass "Switched for Balance"  [me "^fvhas switched to balance teams"]
]


Help greatly appreciated.
Last edited by ZeroKnight on 29 Aug 2011, 00:06, edited 1 time in total.
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Mod Help - Getting a Compass's code

Postby qreeves » 28 Aug 2011, 23:49

ZeroKnight {l Wrote}:Is there a way, be it CubeScript or inside the game code to get the value of a Compass? For clarification, I need the code that makes the compass

Not currently, but I can add it. If you create an alias in a config and want it to persist use: alias blah [echo booooo]; setpersist blah on
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Mod Help - Getting a Compass's code

Postby ZeroKnight » 29 Aug 2011, 01:06

On Supernova, setpersist is an unknown command, so I assumed it was in one of the newer svn builds, however r2779 doesn't compile, and I don't know what the last working revision was.
Also, what exactly does setpersist do? Does it make an entry in config.cfg?
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Mod Help - Getting a Compass's code

Postby qreeves » 29 Aug 2011, 02:01

I might have it wrong, will check when I get home.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Mod Help - Getting a Compass's code

Postby srbs » 31 Aug 2011, 04:24

@ZeroKnight
I have a 100% cubescript solution for you, I'm going to wait for qreeves' response before I tell you.
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Mod Help - Getting a Compass's code

Postby ZeroKnight » 31 Aug 2011, 21:57

srbs {l Wrote}:@ZeroKnight
I have a 100% cubescript solution for you, I'm going to wait for qreeves' response before I tell you.


If you can have a solution that'll do what I need it to do that's pure Cubescript, then you're my hero.
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Mod Help - Getting a Compass's code

Postby qreeves » 01 Sep 2011, 02:26

Yeah, I'm tripping. setpersist doesn't exist.
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Mod Help - Getting a Compass's code

Postby fluxord » 01 Sep 2011, 03:25

qreeves {l Wrote}:Yeah, I'm tripping. setpersist doesn't exist.

<offtopic>
Image
</offtopic>
Topic Related:
Is there any variable/command to get the following stuff with Cubescript:
- enemy "cn" or name that killed the player.
- weapon number or name that the enemy/player has used to kill the player/enemy.
- weapon number or name that the player/enemy has used when dying.

I ask this because I had an idea to write an "autotaunt" script that should work similarly
to the taunt system used by Quake 3 (and its mods); i.e. if you killed the AI,
and if it was using the shotgun when dying it would say something like:
"PLAYERNAME, the next time you and my shotgun will have a little conversation."

It would be nice to have such a script to autotaunt enemies in online multiplayer matches.
But I couldn't find a way in Cubescript to get those values.
User avatar
fluxord
 
Posts: 160
Joined: 25 May 2011, 23:17

Re: Mod Help - Getting a Compass's code

Postby Architect » 02 Sep 2011, 02:38

this was an idea i had right after compass was implemented,
quin decided it would be better not to have it,
i agreed
Architect
 
Posts: 83
Joined: 26 Aug 2011, 11:15

Re: Mod Help - Getting a Compass's code

Postby ZeroKnight » 02 Sep 2011, 02:43

I find auto-taunts annoying.
Also, srbs, could you please post what you mentioned earlier?
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Mod Help - Getting a Compass's code

Postby srbs » 02 Sep 2011, 05:23

fluxord {l Wrote}:Is there any variable/command to get the following stuff with Cubescript:
- enemy "cn" or name that killed the player.
- weapon number or name that the enemy/player has used to kill the player/enemy.
- weapon number or name that the player/enemy has used when dying.

At the moment, no.

ZeroKnight {l Wrote}:I find auto-taunts annoying.

me too

ZeroKnight {l Wrote}:Also, srbs, could you please post what you mentioned earlier?

Well... after actually investgating I found that RE doesn't save it's state on exit.. of which I am baffled by. @quin: What gives?
And since setpersist disappeared, (I though it was there at some point) there is no way to do this. Except with file i/o, but that script of mine from sauer is untested in RE and will most likely not be released anytime soon.

sorry,
srbs
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Mod Help - Getting a Compass's code

Postby ZeroKnight » 02 Sep 2011, 05:41

Hm. That's okay, srbs. I thank you anyway though :)
I guess I'll have to figure something out then. My original plan was to use writecfg() as a template to make writeECdata(), so I've just gotta figure out exactly how to make the function :P
Though I still have to figure out how I'm going to pull compass data. Unless quin follows through and adds that ability in one of the revisions. Are you still planning on that, quin? If so, when?
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Mod Help - Getting a Compass's code

Postby fluxord » 02 Sep 2011, 07:39

Architect {l Wrote}:this was an idea i had right after compass was implemented,
quin decided it would be better not to have it,
i agreed

srbs {l Wrote}:
ZeroKnight {l Wrote}:I find auto-taunts annoying.

me too

Image

IMHO, a configurable autotaunt option would be better than chosing them from a compass :p
I'm thinking of something like:
- taunt after every XX frag.
- taunt after every XX flag/bomb score.
- taunt after every XX death.
- it lets the player customize/add taunts for them (frag, scores, death).
Let the minimum for XX be 3?
User avatar
fluxord
 
Posts: 160
Joined: 25 May 2011, 23:17

Re: Mod Help - Getting a Compass's code

Postby qreeves » 02 Sep 2011, 11:49

LOL
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Re: Mod Help - Getting a Compass's code

Postby Stiva » 02 Sep 2011, 17:24

I contend that bots' stoic silence is a core component of the Red Eclipse experience.
Stiva
 
Posts: 38
Joined: 09 Aug 2011, 22:40

Re: Mod Help - Getting a Compass's code

Postby ZeroKnight » 02 Sep 2011, 19:35

Stiva {l Wrote}:I contend that bots' stoic silence is a core component of the Red Eclipse experience.

I lol'd. +1
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: Mod Help - Getting a Compass's code

Postby qreeves » 03 Sep 2011, 04:59

ZeroKnight {l Wrote}:
Stiva {l Wrote}:I contend that bots' stoic silence is a core component of the Red Eclipse experience.

I lol'd. +1

Good, because it is my firm belief that they are there for fodder only. The real action is with humans, and I didn't want them pretending to be something they're not. Same goes with the generic "bot [X]" names :p
Quinton "quin" Reeves | Lead Developer, Red Eclipse | http://redeclipse.net/ | http://www.facebook.com/redeclipse.net
User avatar
qreeves
 
Posts: 1294
Joined: 17 Mar 2011, 03:46
Location: Queensland, Australia

Who is online

Users browsing this forum: No registered users and 1 guest

cron