Problem - "IDS?"
-
Continuing from my previous post (my PC died on me while I was editing it)…
Here’s how to fix it…
If you have not changed the ids_name in shiparch.ini, the Defender (li_elite and li_elite2) both have ids_name = 237033.
Using FL ID Referrer, 237033 =
DLL: NameResources.dll (3)
Res Name: 40425 (table 2527)
Res Text: Defender (in your case it will probably show …etc… )Go to your Freelancer\EXE folder and find nameresources.dll, and make a backup copy of it (select it, Ctrl-C, then Ctrl-V for the fastest way).
Open nameresources.dll with ResHacker. You will see two folders - these are resource table nodes, String Table and Version Info. Some dlls will also have other nodes, e.g. 23 which is Infocards.
Open the String Table node and you will see many more nodes - these are the String Tables. Look for and open the one numbered 2527. There is a subnode in it numbered 1033 - this is the code for US English language. A table can have several Language nodes. But for FL it should have only 1. This can be 1033 ( US English ) or 0 ( “language Neutral” ). If there are more than one then the first one, Language 0, will be used and since our dll editors write a 1033 node and do not see the language 0 node, any changes you save wll be in a 1033 node and that will not be seen!
Anyway - open the 1033 node and you will see up to 16 entries, numbered 40416-40431.
Look at entry 40425. It should be “Defender” - but I’ll bet yours isn’t, if you did not change the ids_name number, it will have your "
Fix it by overtyping the bad data with the ship name you want, keeping the quotation marks, so it will be “Defender”.Then click Compile Script.
Click File… Save As…, go and find nameresources.dll, click DEL to DELETE it, and save the changes as the same name, nameresources.dll. If the original does not delete, you can rename it instead - I put a ‘-1’ at the end of the filename so it becomes nameresources.dll-1, then -2 etc. It’s up to you what you do, you already have a backup made if you followed my instructions.
Now go and try it in-game.
Remember - ResHack can write a corrupt file just like any other resource editor that I have used, and several have done that including FL ID Referrer, so be careful to keep your last good dll file copied.
In String Tables entries you should have plain text inside quotation marks. I don’t know how may characters a String Table entry can have, it could be 80 but I have not experimented. FL will not display that many because the display fields are small.
The Infocards belong in Infocard nodes, the ones that are under the node numbered 23 in dll files like infocards.ini and equipresources.ini and others. Those entries are in XML and commence with **. ResHack will show you the first 2 characters are FFFE - this means “UTF-16 Big-Endian” encoding.
Over to you, now you know the problem you won’t make it again. :)**
-
I almost added .rc export to ResID, but no one seems to be interested in using those files (at least, until now no one’s replied whenever I mentioned them). You can find the vanilla (JFLP) resource files here. I created the string tables from ResHacker, but I think I did the infocards straight from the dlls.
-
adoxa wrote:
I almost added .rc export to ResID, but no one seems to be interestedProbably only because they did not fully understand your suggestion.
A tool that would extract a .rc script that could be diffed, edited, and re-compiled back into a DLL would be a big help to a lot of modders. ResHacker scripts the string table but does not conveniently handle the xml resources.
So here is one “yes” vote!
-
StarTrader, would appear something is actually wrong with my original file, as i replaced my edited one with it and the problem is still there. Will reinstall FL to a different folder and get the files from there.
Gypsy
-
Oh dear.
OK - before you do that, get the ids_name = number for the ship from your shiparch.ini and put it here, and also follow my guide and paste the contents of the correct String Table here too so we can see?
-
adoxa wrote:
@Bullwinkle, Gisteron: Res2RC.VERY cool, adoxa!
I did a test run to confirm that I could diff two versions of a DLL, edit the results, and re-compile back into DLL form. It worked quite well.
In my brief test, something seemed to change some of the line breaks. I am not sure what does that, since I used Res2RC to extract both versions. I am thinking that it must be one of the other FL DLL editors that introduced different line breaks, but I have not yet investigated this very far.
It is amazing to me that nobody expressed interest in this before. The Resource DLLs are one of the weakest areas of Freelancer modding, and you just created a powerful new tool for the job!
Of course, the tool will have broader appeal if you add a switch to recompile a script. I have heard that there are some people in the world who do not have C++ compilers.
Go figure.
-
ResHack can do this too, that’s what I used until now…
Well I thought I would try it…
Adoxa, as usual no guide?
This one took off like a bat out of the Batcave, no info to me, just a quick flash of a black DOS box that disappeared immediately, then it took over my laptop - and its still running!
… it just ended.
WHAT the HECK did it do, and WHERE did it DO IT?!
Can’t find any output! Blurryellfire!!
At least the others did something I could see or work out, dammit!
Get to be technical writers too, not just deep-sea nerds!
Put some &^ destructions in your work!
I’ve just knocked your rating down 2 points to 7/10!
Bullwinkle wrote:
…I have heard that there are some people in the world who do not have C++ compilers.
Go figure.
Yeh, lots of us… waiting for Babbage version C - codenamed “Cabbage” - haven’t you learned about it?
It’s going to make evey other programming language obsolete! - it’s going to write USER INSTRUCTIONS BY ITSELF!
Ha! rofl!
-
StarTrader wrote:
ResHack can do this tooI wish it could, but it cannot.
The magic of Res2RC is that it handles the xml resources (IDS_Info) that ResHacker does not.
Also, ResHacker cannot read or create full string tables. It bastardizes them when it creates a .rc script.
As for a tutorial, I believe that the standard assumption is that “everybody is a programmer”.
Standard Hint #1: If it does not have a Windows interface, then it is probably a console app. Run it in a Command Window.
Standard Hint #2: If the default Help is insufficient, then read the header in the .cpp file.
-
@StarTrader: I’m predominately a command line user, so as Bullwinkle suggests, you should run it through a Command Prompt. You should also visit my site, which is where I say there are no docs, just run it for usage. But of course, you don’t know about the command line, so just running it apparently does nothing. I don’t really want to explain the command line, but if you want to know what it generates, grab the resource sources from my site. A little sample:
STRINGTABLE { 1002, "Javelin Missile" // RTC 1003, "Javelin Missile" 1004, "Slingshot Missile" 1005, "Catapult Missile" ... 3609, "Countermeasure Flare" 3610, "Imp. Countermeasure Flare" 3611, "Adv. Countermeasure Flare" } 2002 23 { L"<rdl><push>\ <tra bold="" true""=""><just loc="" center""="">\ <text>J63 ""Javelin"" Missile Launcher</text><para>\ <para><tra bold="" false""=""><just loc="" left""="">\ <text>The Javelin Missile LauncherÆs main attribute is its stalwart \ reliability, delivering a punishing payload accurately and effectively. This \ and its relatively inexpensive cost make the Javelin a welcome addition to any \ arsenal.</text><para>\ <para>\ <text>* Requires Javelin Missile.</text><para>\ <para>\</para></para></para></para></just></tra></para></para></just></tra></push></rdl> " } ... 4611 23 { L"<rdl><push>\ <tra bold="" true""=""><just loc="" center""="">\ <text>Advanced Countermeasure Flare</text><para>\ <para><tra bold="" false""=""><just loc="" left""="">\ <text>Based on the same technology as the rest of the CM series, however the \ CM-3 has a greater effective range against a wider array of ordinance.</text>\ <para><para>\ <text>* Fired by Adv. Countermeasure Dropper.</text><para>\ <para>\</para></para></para></para></just></tra></para></para></just></tra></push></rdl> " }
@Bullwinkle: I didn’t really want to write a compiler/linker, since they are freely available (for example, the 2003 Toolkit; I meant to mention that, but forgot). Besides, if I write a compiler, there’d really be no need to write it as .rc, which actually might not be a bad idea…
-
adoxa wrote:
I didn’t really want to write a compiler/linker, since they are freely available (for example, the 2003 ToolkitOooh, good thinking! That way everybody would have a C++ compiler!
Of course I was not thinking about making a full compiler anyway, but a tutorial is certainly easier than any coding solution.
Do you mean the Visual C++ 2003 Toolkit? If so, I do not think it is available anymore. But Visual C++ Express is.
@Startrader - If you need more help than the hints above, I could put together a little tutorial. I am actually a big believer in good documentation.
-
Guys, I hesitate to come out of my nice warm dark closet, but here it is in full…
I am a very old mainframe systems engineer going back to the early 1970s with Burroughs and then IBM, Amdahl, Hitachi and others. I used to (had to for diagnosis) write machine code and then in REXX, Algol, PL/I, PL/II and others. I can get by in several languages in amateurish beginner fashion. I have also been using PCs since the original in 1984, and older non-IBM PCs before then with several operating systems that had shells/consoles like CP/M and Unix and later I played with Linux etc.
And I have also managed (bullied) programmers who are typically like you guys, bashing out loads of really useful systems utilities but without user guides, and worse - without user error traps!
Yeh I know why - they are nerds, just want to push out good utilities faster, or get a project finished, and they hate doubling or trebling the size of their code for stupid users’ error traps - they love machines, despise users - I used to call them LMDU’s (and other less-endearing terms) long before the term nerd came out!
So I am not really the problem, I can usually work things out and the DOS prompt is the second step after double-clicking the darn thing.
But - I often pretend to have difficulties when I see useful utilities that don’t cough up, and this is for the sake of other people that would not find it easy and would not get a guide if I or others don’t ask for one.
But in your favour, I ONLY do it for useful utilities.
By the way I’m glad you didn’t take my post the wrong way, it wasn’t meant to be offensive, just part of the role-play but I think I came close to the line on reading it again.
Mind you when I am cross it comes out the same way too!
In most cases (such as this one perhaps?) a simple one- or two-line help readme.txt is enough, so that others who are not familiar can get started. I don’t like long-winded guides - even if I do write the longest ones myself!
So it should be a standard content of every release of anything, just a simple “Put this in a new folder and run it from a cmd prompt! Add /? switch for help.”
Do others a favour, they are often purely beginners. Copy this line and put it into a readme.txt and issue it with appropriate slight modification in your next and every release!
Now that I have come out of my closet I can’t expect to be taken seriously for this type of request, can I?
So someone else will have to do the moaning and groaning on my behalf!
As for me?
All I need is a completed SUR exporter/ SUR builder so I can fix the many bad Kilrathi and Nephilim ship surs in my RRJDS 2.82 mod which are causing crashes ( our Guild players are deserting us, and it is a shame because it is a good mod and we were the inventors of Fairness, Sportsmanship and Honour in FL gameplay from back in 2003/4 when almost every server was a slaughterhouse for beginners ) and then when I have published the fix and made the mod stable, I will retire from FL gaming.
So there you have it all!
Thanks guys.
One more question - what utility will rebuild the dll from the RES2RC output then?
Or if that’s not it, what utility and what format input? I really don’t know this one. I’ve done everything I needed using ResHack and text editors/excel until now. Did OK, also wrote a diddy that changes the STATs layout by a user-editable template. <smirk>Wonder if it’s because of lack of documentation? LMDUs strike again? Hmmm, now there’s a thought - docs also give more publicity! Well, I never thought of that until now! <sly grin=“”>:D</sly></smirk>
-
Res2RC is adequately documented for what it is… a programmer’s utility.
You use a C++ compiler to recompile the .rc scripts back into DLLs.
Please don’t lump adoxa and me with your newbie programmers. I have yet to see an unhandled exception in any of adoxa’s utilities, and my documentation is well-known (at least professionally).
But, don’t worry about offending anyone, Startrader. I just look for the little nuggets of wisdom that you hide in the rest.
-
OK, good to know! Thanks.
Got time for another short story? lol
No, they weren’t newbie programmers, the guys I worked with were supporting Burroughs and later on IBM Operating Systems and utilities who had been in the business a very long time but had got away with few error-traps or docs until I was sent along to bug them. It was pioneering and continuous work, fixing the OS by patching! Forever being told “Don’t worry, it’ll all be fixed in Version 3.0!” Which eventually came along with so many more of its own bugs! But in those days we also had the 16kb limit on program size (any of you guys remember that?) so we (they) used error numbers and translated them in separate documentation - which never got written, especially the Burroughs ones!
They were much older than me then, and most of them are sadly probably deceased by now. Great guys, I enjoyed riling them. They took it well from a young upstart engineer though, our pinnacles of Software Support! Of course I got a lot of “do me a favour - piss off and get me a Fresh Banana Coffee from Brazil, will you!” - and I loved it when I came back with a supportable-by-evidence “HA! That patch didn’t work either! There’s the dump! Back on your Heads, you Scurvy Sysprogs!”. No Banana coffee though, only machine-black hot water, with and without sugar!
In those days we could smoke in offices, and the sysprogs could always be easily identified even if you didn’t know them - any desk surrounded by 8 to 10 6-7ft stacks of continuous-forms printout (dumps) and a cloud of cigarette smoke billowing upwards from behind, with loud keytapping noises accompanied by the occasional loud curse! That was a sysprog.
I worked loosely with the last couple of sysprogs of the same generation when we were working on Y2K compliance on ICL machines, one was 60 and the other 63! There was also a big shortage of programmers worldwide then. These two of mine had to revamp an awful lot (I think it was about 25 million lines between them) of mainly COBOL programs and had an awful time unravelling the authors’ work and thought-processes from the previous 2 decades! I kept telling them it was because they and their colleagues of those days had been LMDUs! lol
They did wonders anyway, writing their own utilities to automate as much of the work as possible, testing and retesting, setting up very complex test systems, and Y2K went without a hitch for our customers. They were all unsung heroes in my opinion, and not to be forgotten, working 12-18 hours a day for weeks on end including weekends to make it in time on limited budgets. If there had been an anti-smoking law then it would have been broken worldwide by sysprogs and they would have been working from jail!
And all because of lazy space-saving 2-digit programmers! Heheheh.
If any of you remember there had even been a stupid panic to not use lifts in case they crashed or went to emergency position with a load of passengers!
Ah, the fun days! You young guys don’t know what you missed!
-
My first computer was the Amstrad CPC 464, 64K total memory (including video), using tape. I used it right up until the end of '94. That’s partly why I include the source for everything, since I grew up with type-ins.
As far as Res2RC goes, if you don’t know the command line, it’s probably no good to you anyway. But point taken (still doesn’t mean I’ll write readme’s, though).
-
adoxa wrote:
My first computer was the Amstrad CPC 464Ah… the classic Z80! From CP/M to Pac-Man to military flight avionics, it is a classic.
Was that machine your motivator to become fluent in assembly language?
Your documentation may be terse but it usually does the job. Headers in the source are more important than readme files.
The only thing I ever had trouble with was the “topics” in Console… I kept typing “help ships” until I finally figured out that I should type “help player” instead.
@Startrader: So, if I understand your story correctly, then you were partially responsible for creating that Y2K problem in the first place?
(Just kidding)
-
Far from it, I was not a sysprog, sadly - I would be earning tons of money today if I had gone that way instead of fixing processors. Actually the majority of our problems were in disk and tape subsystems and printers as processors became more reliable.
My involvement with the sysprogs was because I had overall responsibility for a major customer who had 3 large systems, the largest in the UK, and I had to prod and poke our sysprogs in supporting that customer with (continuous!) quick fixes to the Operating Systems and applications and utilities - hence the stacks of dumps. That happened in two stages in my career, and sysprogs were integral to our hardware teams.
And then in the late 90’s I was involved in supporting those ICL customers via the 2 sysprogs who were making the fixes for them. Somehow, IBM systems were not so affected but IBM nonetheless made an awful lot of money selling “Y2K-compliant” upgrades!
adoxa - OK, how about making me or BW your Technical Writer? Tell him what it’s supposed to do, and he can write your docs while you bash out more utilities.
-
Sure, if you’d like to write the docs, I’ll update the zips. I just feel that for these basic utilities, the normal help screen is enough. But as you point out, only for those that know to use the command line.
Learning assembly was just a natural progression, since that was basically the only choice after BASIC. I did have a Pascal compiler, but it produced 10K programs at a minimum, which is quite a lot when you have to load it from tape. All the editors I used were line-based, glad those days are over. When I first saw Turbo Pascal’s syntax highlighting, I was so impressed, I managed to do it for BASIC listings. One of the most useful things I ever wrote. Had a few type-ins published (one in an Aus mag and three in two UK mags).