Jump to content

icon popup gauge -- what number to choose


il88pp

Recommended Posts

Hi everyone,:)

 

I've created a popup icon gauge for on the panel, and a popup to call with it.

No help needed getting it working. Gauge is working great, so is popup.

Problem is, I'm thinking about sharing it. But not sure of something.

 

I used the following in the gauge:

n (>K:PANEL_ID_TOGGLE)

 

and in the Popup is:

ident=n

 

in both of those, n is a number.

 

I saw the numbers you could use here were numbers between 10000 and 20000

And that (many of the) lower values were reserved by fsx.

 

So far so good.

But when it came to sharing I thought, I have to choose a number that is not already used by another developer.

If I don't make sure my number is unique/new, clicking my icon (or his), would pop up not only my 2D popup, but the other developers popup as well.

 

(easy fo me to change when that occurs on my pc one day, in a new addon plane, but not so easy for the end user to fix.)

 

---------

The questions:

-is there any kind of convention for using a number here?

-Is there anyway to know which numbers others used, so I can choose a free one?

 

Or is there no way of knowing, other then installing every plane in existence?

Should I just pick whichever number I like then? (between 10000 and 20000 of course).

 

While writing this I realise that even if I choose a unique number now, someone can make a simlilar gauge tomorrow. Using that same number.

So even if I choose something unique, it may not stay that way...

 

Please share thoughts!

I find creating a gauge relatively easy compared to choosing names and such when posting. Man that's hard!

 

The reason this number matters a bit is, this popup (and icon) have a use in pretty much every possible plane!! So much chance of conflict.

il88pp.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Thank you.

But that's just the list of which are available, and which are reserved.

With 10000-19999 available to the user/developer to use.

 

But I'm looking for a list of which numbers have been chosen by other developers in the past.

So I know which number is free for me to use.

 

Let's assume I choose 10010

And you, in the past, published an Icon-Popup that also used 10010 as number.

Then clicking my icon, would make my panel show, and ours as well.

See the issue?

 

The rest of your link seemed helpful. But it wasn't quite it either.

It explains how to make it so that when a [Windowxx] with ident=10010 is opened, another [WindowYY] with a different ident= gets closed at the same time.

 

That wouldn't help me though, as in my feared situation, both your addons Ident=, and my ident= would be identical.

 

I simply need to know what numbers my fellow devs used in the past, and which between 10000 and 20000 are still available. (not so simple perhaps).

 

Or, thinking outside the box, perhaps use an "ident=" that is an unique String perhaps?? A word has perhaps more chance of being and staying unique.

I didn't see any mention that it's possible to use a word instead of a number. (other then the default panels, that use a word as Ident. GPS_Panel for example. Those are not an option here. They are reserved by FS for other things. I would like to use my own unique string, for example ident=peanutbutter.)

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Hi il88pp

 

Regards ,

" But I'm looking for a list of which numbers have been chosen by other developers in the past. So I know which number is free for me to use. "

 

I am of the firm belief that you will never get a list of numbers that have been used in the past by developers .

So very many would have been used it would run into the thousands .

 

I checked my panel , and in that alone I use 14 numbers .

I have never experienced a conflict with window icon call up numbers caused by other developers use of numbers .

I should also state that all my instruments reside within the aircraft panel folder , so that alone might reduce the possibility of such conflicts .

 

I hope that others might chip in with ideas and comments on this topic .

 

Regards ,

" I find creating a gauge relatively easy compared to choosing names and such when posting. Man that's hard! "

 

I agree 100% , is it ever hard , I currently have a panel update ready to upload to freeware sites , it has some interesting but complex navigation instruments with a great range of capabilities and options .

Unfortunately writing the Flight Manual is a can of worms , Oh for a Shakespere who could write my instructional notes in a coupe of days .... such would be nice .

 

Cheers

Karol

Link to comment
Share on other sites

Thank you,

I didn't think a list is likely, but I had to ask.

And I'm glad I' not the only one that finds it hard to choose the final names.

This panel of mine btw isn't complex at all.

It's a popup that shows only an image. No gauges on it. It's a list of info to have handy during a flight. Image only. Like a quick reference, but without clickspots or anything.

 

As it is useful in any plane, install instructions wil be to place in /Gauges folder, and put line in each aircrat you want to use it with. Especially since an image is involved. Would be weird to put that image file in each panel folder, and the gauge as well. Much better off all in one cab, and that in /Gauges.

 

Thanks for sharing your thoughts. I hope more chime in as well.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

You can run a batch command on your own installed aircraft that will list all your panel idents, not sure that helps much but it's a handy little trick to have up your sleeve nonetheless, try this:

 

findstr /s /i /c:"ident=" panel.cfg > panel_ids.txt
start panel_ids.txt

 

Paste the code into notepad and save it in your SimObjects\Airplanes folder as "get_panel_ids.bat" (or baseball.bat, it doesn't matter), double click it and it'll search through all your panel.cfgs and write each panel ID to a .txt file (panel_ids.txt) in the same folder and open it for you to read when it gets done. Also handy for searching aircraft.cfgs for "electric_always_available = 1" or listing all the title= lines supposing you're diagnosing a duplicate title problem.

 

 

More specifically, suppose you choose ident=14356 and you want to know if it's already in use:

 

findstr /s /i /c:"ident=14356" panel.cfg > panel_ids.txt
start panel_ids.txt

 

If it finds anything then you know 14356 is already in use and it'll tell you which panel.cfg uses it. Again it can only check your own installed aircraft of course. If you want it to list your rotorcraft too save the .bat file in your SimObjects folder rather than your SimObjects\Airplanes folder and it'll search through the entire SimObjects structure.

 

Jim

Link to comment
Share on other sites

When I write a icon to call a pop-up gauge, or whatever it may call, I just use a random number generator, with 10001 to 19999 as constraints, and let it pick the number for me. If it conflicts with another icon's number, I either change mine 10 either way, or run the RNG again. 10000-20000 has a lot of possible choices, and I figure the chance of using the same number as another dev (NOT that I consider myself a dev by any means!) is fairly slim. So far, and it's not like I've written a large number or anything, I haven't had a conflict yet.

And I know, computer run RNGs aren't truly random, but it works ok for me.

Not super helpful I know, but the best I can offer.

Good luck, however you do it, il!

Pat☺

PS: That little batch file is a very handy little item, it seems to me. If it's ok with you, Jim, I've saved it off and will use it next time I write an icon :D

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

Thanks Jim, that's usefull. Even though I have few planes really to be honest.

 

I know only a little about using a batch file. Virtually nothing on writing one.

I just tried it, and it generated a huge list.

Working through that would take ages. And find: "1****" Is there a way to make it spit out only the results between 10000 and 20000?

 

I guessed at:

findstr /s /i /c:"ident=1****" panel.cfg > panel_ids_10000.txt
start panel_ids.txt

But that left a blank file. Probably because there are no files with the exact: "ident=1****".:)

 

Do you have a simple solution to find only the interesting idents?

If creating that would be a lot of work, please don't.

I could never completely rule out conflicts, and it's easy enough to add a note saying that if a conflict occurs, they shouldn't use mine with that particular plane.

 

I have also been thinking, I could add a second gauge quite easily, same icon, diffferent number in the xml.

I could then suggest the user to use that gauge= line instead and ident= line instead of the default one, to prevent the conflict.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

It's probably possible to do in the batch with "FOR" but that would require some messing around, I'd probably just use "replace" in notepad to change every occurrence of ident= to , (comma) in the output .txt file and then rename the .txt to .csv. That will open in Excel and you could sort the actual idents column from A-Z to put them all in numerical order. (in Excel do Ctrl+A then Format > Column > Autofit selection to make it readable)

 

Here's something semi-related I did a while back, I never went through with uploading it but you might enjoy messing with it so I'll put up a link. It's a batch file that will write an icon toggle gauge for every possibility between 10000 and 19999. It takes it about 3 minutes to write 10,000 gauges. When it finishes writing all the gauges it uses cabdir.exe to put them all in a .cab file. These toggles are just an invisible clickspot though, no actual icon. The idea is you can lay one overtop of the PFD for example and then click on it to open a larger 2D variant of the PFD. I use them all the time for popping this or that open. It's all pretty well explained in the readme I think.

 

gauge_builder.zip

 

Jim

Link to comment
Share on other sites

sorting worked. I did what you said and replaced ident= with ,

Then renamed file to .ods and opened with openOffice.

Sort by second column. Done.

File covers whole simobjects, but only about 20 or so different ident no.'s between 10000 and 20000.

 

I think I'll look at that list and selct one not on there, then take the plunge. Spending too much time on this small detail.

 

Thanks for your many gauges gauges.;) Maybe something to look at later. Nifty. But I think at the moment 30.000 new gauges would just confuse me.:D

 

I think the solution of adding not 1 but 2 popup icon xml's is best. Give the user a normal way of installing. And an alternate if there's a conflict. Keeps it simple. I find that elegant.

 

Worrying more now about how to best post it. May send you a PM about that somewhere in the next few days.

Thanks again. Still very grateful you taught me the gauge basics a while back. Such fun!

il.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Btw Jim, I managed to get blackbox3 working. I tried before and failed. Blamed that on win7-64b. But was my own fault.

I got it set up right and now it runs fine. I rewrite the bb3 gauge by hand after it's created. To enlarge font and spacing. Worked wonders when I was trying to follow what my fuel required/available gauge was actually doing.

I'll try logger too one day, but for now blackbox was plenty. Great tool.

Cheers,:D

il.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

  • 2 weeks later...

Okay, having read the entire thread, it seems that there is some confusion about the question of ID numbers for popup panels.

 

The simple answer is that whatever you choose within the allowable range does not matter, with one exception: it cannot be the same as one any other gauge uses within that same aircraft!

 

The last four words above are the key: within that same aircraft. The same number you choose may well be used by a dozen other aircraft in your Aircraft folder, but since they are not loaded, it simply doesn't matter... :cool:

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

Within the same aircraft, ok. So a small chance of a conflict only.

But this popup could be used in any aircraft. And that makes the chance of a conflict larger.

If/when I publish it I'll add a second popup icon just in case.

 

(Not with the intention to install both at the same time of course. Install one of them. If that causes a conflict, remove it and use the other.)

Thank you. Il.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

I can almost guarantee that if you choose a really high number such as: 19998 it will never conflict with anyone else's panel ID number... ;)

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...