• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Shell options

Started by Red Spot, May 14, 2009, 07:00:55 AM

Previous topic - Next topic

Nielk1

OK, you REALLY need to look a the new functions to get the other settings, or players will be mighty angry with you they can just click host and have it instantly have their pre-set custom colors.

Click on the image...

Red Spot

Who says I havent ? ;)

Anyway, why would someone be upset cause the person who is hosting a game selects a certain setting? Its like saying I shouldnt allow a custem recy cause someone might get upset when you select it. Remember this is an option, not a mandatory setting.

Besides that, look below:
http://members.ziggo.nl/red_spot/Recy%201.jpg
http://members.ziggo.nl/red_spot/Recy%202.jpg
http://members.ziggo.nl/red_spot/Recy%203.jpg
http://members.ziggo.nl/red_spot/Recy%204.jpg
*Something intelligent, yet funny*

Nielk1

#17
Please read my posts!
Read read read!

I said the PLAYER would be upset that their long thought out custom colors are not READ IN as they are supposed to be, or they are NOT GETTING THE HOST'S CUSTOM COLORS as they wanted, but instead only have the option of what the host (or perhaps themselves) set in shell.

You are going about this all the wrong way.
Very very very very wrong.

game.teamcolors is NOT the color selector. It is what simply tells the game if no colors, team colors, or FFA colors are used. Gameprefs is what sets the colors, and if you prevent the reading of gameprefs you are making some player who spent the time to make their custom colors so they do not have to enter theme very time very angry.

You MUST, and this is critical MUST, program in reading of the current chosen settings in relation to the new team color system or otherwise ensure the feature still works. You cannot simply ignore it and treat this like pb4a.

Unless of course you did take care of that, which I doubt from your responses, but you may think you did.


EDIT:
You should use the following functions:
DLLEXPORT void DLLAPI SetTeamColor(int team, int red, int green, int blue);
DLLEXPORT void DLLAPI ClearTeamColor(int team);

// More teamcolors functions.
enum TEAMCOLOR_TYPE
{
TEAMCOLOR_TYPE_DEFAULT, // Defaults
TEAMCOLOR_TYPE_GAMEPREFS, // What's set in gameprefs
TEAMCOLOR_TYPE_SERVER, // What the server sent us.
};

// Set functions. Probably easier to use these functions when setting
// a bunch. Does nothing if type is invalid
DLLEXPORT void DLLAPI SetFFATeamColors(TEAMCOLOR_TYPE type);
DLLEXPORT void DLLAPI SetTeamStratColors(TEAMCOLOR_TYPE type);

// Get functions. These will set r/g/b to 0 if a setting for type or
// team is invalid. For GetTeamStratColor, the team parameter must be
// 0 (first teamgroup) or 1 (second teamgroup)
DLLEXPORT void DLLAPI GetFFATeamColor(TEAMCOLOR_TYPE type, int team, int& red, int& green, int& blue);
DLLEXPORT void DLLAPI GetTeamStratColor(TEAMCOLOR_TYPE type, int team, int& red, int& green, int& blue);

// Swaps the current teamgroup colors, e.g. swap colors of teams 1..5
// <-> 6..10.  Note - this can be called, even if FFA colors are
// set. You may not like the results if you do that.
DLLEXPORT void DLLAPI SwapTeamStratColors(void);

// Returns whether the last set of team colors set were FFA (returns
// true) or Team Strat (returns false). Calling these functions will
// change its return value:
//
// TeamplayTeamColors(), SetTeamStratColors() - will return false
// DefaultTeamColors(), SetFFATeamColors() - will return true
DLLEXPORT bool DLLAPI GetTeamColorsAreFFA(void);

// After ffa or team colors are set up -- i.e. one of the 4 functions
// listed above GetTeamColorsAreFFA() is called -- this will call
// SetFFATeamColors() or SetTeamStratColors(). Just a convenience
// function.
DLLEXPORT void DLLAPI SetTeamColors(TEAMCOLOR_TYPE type);


EDIT:

Do me a favor red. With how you have it now, test the 3 chatline commands that control colors, if they still work right it might be no worry. I would suggest a button for clients that auto enters the 3 options and for server that auto enters the 2 (not server).

Click on the image...

Red Spot

#18
Quote from: Nielk1 on May 14, 2009, 04:42:50 PM
Please read my posts!
Read read read!

I'm guessing you need to read mine, as I said before, it is an "option" .. do nothing and the colors will not be changed, don't use it if you get angry cause it overrides your localpref colors....

You also do not need to post code from scriptutilities.h as I've seen it, where do you think I get commands from ..

QuoteUnless of course you did take care of that, which I doubt from your responses, but you may think you did.

Did you look at the pictures I posted above? The last one is the color from localprefs, so even if a color is set you can still go back to your own preferences.
*Something intelligent, yet funny*

Nielk1

#19
The Last one is TEAM, not colors from gameprefs. Take a look at them, they are the stock TEAM colors, unless you CHOSE to set your custom colors the same and did not realize yourself.

And stop smiting me every time I try to warn you about things.

I read your GOD DAMN post, and you DID NOT READ MINE.

I described in my post what in yours was incorrect about your reading/understanding of mine. I wrote in mine what you did show and what you apparently thought you showed, but since you are to dense to see it, let me put it in a more direct format:

YOU DID NOT READ MINE:
I talked about how players would be angry if this overrode their custom settings.
You said I was saying some irrelevant thing about a client angry with server settings, when I was talking about an angry server AND client about the inability to use what they want. Your situation did not match the one I gave. The images you gave would have dispersed any concern on my side, if they showed ANYTHING. As for smiting me, I gave you god damn code, I went out of my way to try to help you, to indicate where you may ahve a problem, don't be an ungrateful ass.

I READ YOUR POST:
Your pictures indeed DO NOT show what you think they do. They show your custom from DLL, then none, then STOCK FFA, then STOCK TEAM. Note, they showed STOCK STOCK STOCK colors, not custom.


So, either dispel my concerns or apologize for attacking me when all I tried to do was both warn you, clarify what I said, and give you a nudge in the correct direction to resolve the issue. This simplest way to dispel concerns would be to show your team color function or some such from your DLL, but instead you insist on misreading my posts, then accusing me of doing the same when I give what you said and what I see said, but you never touch on those, just claim I am wrong again with no support.

NOTE: I consider a smite in return for attempting to help you an attack.

Click on the image...

Red Spot

I suggest you check what you're saying before you start your flaming .. as "game.teamcolors 2" uses the settings from localprefs .. I made sure I checked that ...

What do you think I do, just write some code and blindly accept it works or do you think I actually test these things ? (well, stupid question actually ...)

If you cant reply in a normal way and make sure what you suggest is actually correct than please stop posting in my topics, thanks.
*Something intelligent, yet funny*

Nielk1

#21
Quote from: Red Spot on May 15, 2009, 09:52:21 AM
I suggest you check what you're saying before you start your flaming .. as "game.teamcolors 2" uses the settings from localprefs .. I made sure I checked that ...
Your images showed STOCK COLORS. Show me gameprefs colors and I have no more concern. Do you purposely write responses that do not answer questions and act like they do? How do I know your DLL does not effect the TEAM and FFA colors (which it can)? How do I know your code doesn't kill the gameprefs customs and make only stock colors accessible? Only you have your code. I still have not flamed, though I have been quicker to anger since this is the third time you disregard what I say and answer with non answers. You... You.. Politician :-P

Quote from: Red Spot on May 15, 2009, 09:52:21 AM
What do you think I do, just write some code and blindly accept it works or do you think I actually test these things ? (well, stupid question actually ...)
Yes, I do. Unless you show me something to the contrary like images that show colors that are actually custom, you have failed to show me anything to shows you have forethought this issue.

Quote from: Red Spot on May 15, 2009, 09:52:21 AM
If you cant reply in a normal way and make sure what you suggest is actually correct than please stop posting in my topics, thanks.
I did reply the normal way, then you ignored what I said or changed it in some way to suite your ability to dismiss it. So I tried to correct your misreading of my post, though stronger than I normally would as this is the third topic you would do so, and you apparently failed to read beyond 4 choice lines your used to again dismiss what I said without an actual answer. BTW, selective reading and interpreting means you did not read my whole post, or at least, failed to process it all.

I end up considering things you ignore to be true since you must have ignored them for some reason.


EDIT:
Quote from: Red Spot on May 15, 2009, 03:15:35 AM
Did you look at the pictures I posted above? The last one is the color from localprefs, so even if a color is set you can still go back to your own preferences.

My point is THEY DO NOT SHOW IT IS WORKING!

I asked someone to come look at this thread and tell me who's wrong. I know I angered quicker than normal but after a sum total of 10 posts of yours like this in other topics and about 7 undeserved smites, what do you expect of me when you start twisting words (includes word omission) again?

Click on the image...

Red Devil

Okay, enough "Code Rage".  Shouting only makes people deaf to what you are saying.
What box???

Nielk1

#23
After saying the same thing 4 times I must agree. Screw it, do what you want... :|

If you have a question ask it but if you make any possible errors and don't see them I won't say anything. Till its released. Then you will have to patch.

Click on the image...

Red Spot

#24
GBD,

Incase you'd like to know, I got it all to work as I wanted in the shell, updated the picture in the first post.
The boxes at the bottom only show the RGB values, the (transparent)"Custom" button launches a new window and a (blank)button hidden behind it makes sure the "Custom" button lights up when selected :)

edit: The dummy button is cause if I do it without you can only press the "Custom" button once. Then have to press an other button to be able to re-use the "Custom" button. With the dummy button it does light up and you can re-use it.

CreateControl("CustomADummy", "BUTTON")
{
ColorGroup("BLACKBLUE");
Geometry("LEFT", "TOP");
Pos(50, 200); //
Size(60, 9); //
BorderSize(3);
BevelSize(3);
Style("ROLLOVER", "RADIO", "OUTLINE");
Cursor("Highlight");
Font("TINY");
Text("");
UseVar("network.session.ivar35");
Value(16);
}

CreateControl("CustomA", "BUTTON")
{
//ColorGroup("TRANSPARENT");
Geometry("LEFT", "TOP");
Pos(50, 200); //
Size(60, 9); //
BorderSize(3);
BevelSize(3);
Style("TRANSPARENT", "ROLLOVER", "OUTLINE"); //Style("ROLLOVER", "RADIO", "OUTLINE");
Cursor("Highlight");
Font("TINY");
Text("Custom");
NotifyParent("Button::Press", "bCustomA");
}



OnEvent("bCustomA")
{
Cmd("network.session.ivar35 16");
Exec("bzshell_multi_rsvcolorsA.cfg");
FadeIn("|RSVColorsA");
}



CreateControl("ColorA1", "STATIC")
{
ColorGroup("LISTBOX");
Geometry("LEFT", "TOP");
Position(40, 220);
Size(22, 9);
BorderSize(3);
BevelSize(3);
Style("BLACK");
Font("TINY");
JustifyText("center");
Text("%d");
UseVar("network.session.ivar37");
}

CreateControl("ColorA2", "STATIC")
{
ColorGroup("LISTBOX");
Geometry("LEFT", "TOP");
Position(69, 220);
Size(22, 9);
BorderSize(3);
BevelSize(3);
Style("BLACK");
Font("TINY");
JustifyText("center");
Text("%d");
UseVar("network.session.ivar38");
}

CreateControl("ColorA3", "STATIC")
{
ColorGroup("LISTBOX");
Geometry("LEFT", "TOP");
Position(98, 220);
Size(22, 9);
BorderSize(3);
BevelSize(3);
Style("BLACK");
Font("TINY");
JustifyText("center");
Text("%d");
UseVar("network.session.ivar39");
}
*Something intelligent, yet funny*

xSSx Grizzly

I like the look of it mate, will save me going through all the cr*p again  :-D :wink:

Sonic

OK look, I don't like finding someone hitting the ABUSE BUTTON because they can't take an argument. No one here is really breaking any forum rules. Yes, Nielk is a bit heated up at the moment but I understand why. Red Spot, Nielk is trying to tell you how TA5 works; players can specify their custom team colors in the gameprefs.ini file. Your option game "game.teamcolors 2" is used by the game system to determine which color scheme to use (aka, Team Strat, FFA, etc). You appear to be using a number that is already assigned and thus can cause major issues with the system already in place.

I have a custom DLL I write with friends and I have to watch the toes I step on. It worked fine in pb3 but when I ported it to TA5, some of the ivar/svar's I was using were now used by stock. In fact, I was reading an option from the DM "Gravity" setting; so I modify my ivars and adjusted my shell accordingly. Please READ what Nielk is saying, if you don't fully understand what he is saying, ask someone to translate for you or ask Nielk to slow down. He isn't a bad guy nor is he out to get you.

Also, consider this a WARNING. Anyone who pushes 'report to moderator' (you know who you are) when no forum rules are clearly being violated will get a Temp Ban from me. I do NOT enjoy finding these things in my mail box only to find the issue being an argument. If you feel you are being flamed, PM me or another moderator/admin and we will look at it when we have a chance. Do NOT abuse the abuse button.
"Linux is user friendly...
...it's just very selective about who its friends are."