Jump to content
The Beta Account Center is temporarily unavailable ×
Hotmail and Outlook are blocking most of our emails at the moment. Please use an alternative provider when registering if possible until the issue is resolved.

Recommended Posts

Posted (edited)
17 minutes ago, BlackSpectre said:

Or anyone: any chance you know a way to get this bind to work?

 

I don't have time to monkey with it right now, but looking at https://homecoming.wiki/wiki/Conprint_(Slash_Command), it looks like you would at least need to put <color red><color red>Hello There! in quotes inside of the other quotes for the macro/keybind which I would think could cause issues once the second " is reached in the macro.

 

To me, it appears that it isn't a slash command intended to be used in a macro based on the structure used.

I'm assuming this slash command is mean to work as a standalone entry or, alternately, in a popmenu or custom window as indicated on the Wiki page.

 

Edited by UltraAlt

If someone posts a reply quoting me and I don't reply, they may be on ignore.

(It seems I'm involved with so much at this point that I may not be able to easily retrieve access to all the notifications)

Some players know that I have them on ignore and are likely to make posts knowing that is the case.

But the fact that I have them on ignore won't stop some of them from bullying and harassing people, because some of them love to do it. There is a group that have banded together to target forum posters they don't like. They think that this behavior is acceptable.

Ignore (in the forums) and /ignore (in-game) are tools to improve your gaming experience. Don't feel bad about using them.

Posted (edited)

Not an expert, but wouldn't you have to put the text in between the two <color red> things?

And the second one needs a slash  </color red> to close it out.  Otherwise it will continue being red text.

Edited by Bionic_Flea
Posted (edited)

No. The problem is that it ends up with quotes inside of quotes, which the game doesn’t like. 
 

/bind K "conprint “<color red><color2 red>Hello There!” "
 

Using it as a straight slash command in the chat box works:

 

/conprint “<color red><color2 red>Hello There!"

 

notice there’s no quotes inside of quotes. 
 

I’ve tried the custom delimiters used with popmenus and custom windows, <& &>, but no go. Then I tried other versions of the same quote character, colons, semi-colons, commas, spaces, non-breaking spaces, and a lot more. I’m stumped. 
 

You’re welcome to play with it in game, and if you figure it out I’ll buy you a Starbucks coffee (I’m not kidding), but it might be that only a dev can figure out something like this. 


A player named Vanden recently updated the /Conprint page with a ton of new and freakin awesome capabilities. It’s a shame not to be able to use them in binds. 
 

 

 

Edited by BlackSpectre
So many typos. Sigh.
Posted

Here's how I load it in from a keybind file:

 

KEYNAME "conprint "your text here""

 

You might try throwing the binds into a file and loading them in that way.

Posted (edited)
2 hours ago, Bionic_Flea said:

Not an expert, but wouldn't you have to put the text in between the two <color red> things?

And the second one needs a slash  </color red> to close it out.  Otherwise it will continue being red text.

It's not necessary. I guess it doesn't matter to the game.

 

 

 

 

 

Edited by BlackSpectre
Posted (edited)
17 minutes ago, AboveTheChemist said:

Here's how I load it in from a keybind file:

KEYNAME "conprint "your text here""

Wow. That shouldn't have worked, ATC! I guess my understanding of what's going on in the background of popmenus and binds is slightly off. Still, the color tags are apparently treated literally when used as a bind, so they show up in the output too.

 

This  

KEYNAME "conprint "<color blue>your text here""

renders this

<color blue>your text here

 

That's a regular color tag in game. It would be wonderful if we could use that and the other HTML tags Vanden discovered.   /Conprint

 

 

 

 

 

Edited by BlackSpectre
Posted
5 hours ago, BlackSpectre said:

Or anyone: any chance you know a way to get this bind to work?

 

/bind K "conprint <color red><color red>Hello There!"

 

I read  https://homecoming.wiki/wiki/Conprint_(Slash_Command).  More importantly, I logged in and did some testing.

 

First, you need to use "<color red>" and "<color2 red> tags to change both the top ("color") and bottom ("color2") of the printed test.

 

Second, the command interpreter in City is very fiddly, especially about nesting quotes (" " and <& &>).  I could do a direct use of "conprint" via the Chat window and it would work:

/conprint "<color red><color2 red>Hello world!"

 

But I couldn't make a bind that assigned that to any KEYNAME that would work.  The first token ("conprint") in a variety of quoting styles either worked but didn't interpret the "color" and "color2" tags; or it didn't work at all, giving an error message when I pressed the assigned KEYNAME.   As /showbind is limited in how it displays what is bound to a KEYNAME, I often couldn't see what was wrong, just that it had to be wrong as pressing the KEYNAME didn't do what the direct "conprint" command was doing.

 

From @BlackSpectre's testing, I think @AboveTheChemist has the way to work around this problem.  In my own work on City UI customization, I too have found that loading a keybind from a keybind file can make work what doesn't in other ways.  That is the way to do this:

 

25 minutes ago, AboveTheChemist said:

Here's how I load it in from a keybind file:

 

KEYNAME "conprint "your text here""

 

You might try throwing the binds into a file and loading them in that way.

 

What is different here is that in loading from a keybind file, the correct command line gets assigned to KEYNAME such that when the KEYNAME is pressed, conprint is invoked with a string argument in which it can see and properly interpret tags like "color" and "color2".  Nesting of the quotation marks are stripped in a way that works.

 

To find out more about that, check here:

https://homecoming.wiki/wiki/Bind_load_file_(Slash_Command)

 

Note that in file pathnames, Slash "/" will work no matter the operating system.

 

Yes, this is all very fiddly.  Such is what happens when things are not very carefully designed from the outset.

 

 

Remember!  Let's be careful out there!   SAFETY NOTE:  If Leader not on Map holding the Mission  Door, First Toon through the Mission Door will set Notoriety.  Hold until Leader on the Map!

City Global @Jacke, @Jacke2 || Discord @jacke4913  

@TheUnnamedOne's BadgeReporter Popmenu

Commands Popmenu including Long Range Teleport Available Zones

Finding Your City Install Root on Windows for HC Launcher, Tequila, Island Rum  

Posted
16 minutes ago, BlackSpectre said:

that and the other HTML tags Vanden discovered

 

To be fair, it was Faultline that posted the full list of tags in the closed beta discord, and Vanden ran with them. And to quote Faultline from same regarding the nature of the tags "it's not HTML, it's a bastard thing of uglyness".

 

Here's the full list of tags, in case any are not included on the wiki (as quoted from Faultline, including the notes at the bottom):

 

Quote

'b', 'i', 'color', 'color2', 'colorhover', 'colorselect', 'colorselectbg',
  'scale', 'face', 'font', 'a', 'link', 'linkbg', 'linkhover', 'linkhoverbg',
  'linkselect', 'linkselectbg', 'outline', 'shadow', 'text', 'ws', 'bsp',
  'br', 'table', 'tr', 'td', 'span', 'p', 'img', 'nolink', 'bgcolor',
  'bordercolor', 'duration'
that's every tag that it supports, of most of them are supported badly.

(duration is for cutscenes)

 

Posted
22 minutes ago, AboveTheChemist said:

 

To be fair, it was Faultline that posted the full list of tags … Here's the full list

Very cool!

 

Did Faultline mention any way to make them work with a bind?

 

I did discover that at least the color tag will work in a macro, and as a command in a popmenu. 

Posted
57 minutes ago, BlackSpectre said:

Did Faultline mention any way to make them work with a bind?

 

Sadly he did not. He posted a few examples but those were all command line, not from within a bind/macro/popmenu. Here they are in case anything can be learned from them (notes are Faultline's):

 

Quote

okay, this worked: /conprint "<a href='cmd:thumbtack 0 0 0'>Zero</a>"
you can even do /conprint "<img src=badge_bughunter_01>" if you want
it's your client, nothing stops you


Example with the various tags in use:
<font face=computer outline=0 color=#32ff5d><b><span align=center><scale 1.8>Would you like to create a Hero or Villain?</scale><br><br></span><font face=computer outline=0 color=#22ff4d><b><linkhoverbg #55555555><linkhover #a7ff6c><link #52ff7d><b><table><tr><a href='cmd:createHero'><td highlight=1><span align=center><img src=createsymbol_hero.tga><br>Hero</span></td></a><a href='cmd:createVillain'><td highlight=1><span align=center><img src=createsymbol_Villain.tga><br>Villain</span></td></a><tr></table></linkhover></linkhoverbg></linkbg></link></font></b></font>

 

1 hour ago, BlackSpectre said:

Still, the color tags are apparently treated literally when used as a bind, so they show up in the output too.

 

Probably a shot in the dark but did you try closing the color tag like you would with normal HTML?

Posted (edited)

It seems the color and other HTML tags are being interpreted literally when used as a bind and therefore don't function. So this:

K "conprint "<color red><color2 red>Hello There!""

is rendered on the screen as:

<color red><color2 red>Hello There!

 

This indicates without a doubt that there is some issue with the bind code behind the scenes. 

 

Honestly, this might be a super easy fix for a dev. Code that works is already present in the code for macros, so a simple copy and paste might just work. Although knowing how code is all interconnected, it might not be as easy as that. To that end...

 

TWO CUPS OF STARBUCKS COFFEE TO ANY DEV WHO FIXES THIS ISSUE! (and multiple devs working on it will get coffee too!)

  • Eligibility: Any individual who contributes to fixing this problem so that the HTML tags for /Conprint (and possibly other commands) will function in a keybind. A valid email address, HC forum account to send a private message, or in-game global name to send via in-game email is required to send the coffee link. Just let me know which you prefer. 

 

Incidentally, fixing this might also fix the long standing bug using /petsay with emotes Petsay (Slash Command) - Unofficial Homecoming Wiki

 

An lastly, as long as I have your attention, is there a way for /conprint to link to an external website such as City of Data2 or BadgeReporter, etc.? That capability would be very useful in player made popmenus and other tools. I'm not very good at thinking about security or possible player exploits, so I leave that up to you.

 

 

 

 

Edited by BlackSpectre

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...