How to get scriptproperties.html to work?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
Snowfious
Posts: 45
Joined: Wed, 26. Jun 19, 00:49
x4

How to get scriptproperties.html to work?

Post by Snowfious »

Hi there,

I'm trying to dive once again into modding, and reading a tutorial to use XRCatTool on the main X4 .cat files to extract all the variables and such. I did this exact same thing nearly a year ago, and the only html browser that could open the scriptproperties.html was Internet Explorer. Well, now I don't have that, I have the new Microsoft Edge. Firefox, Google Chrome, and even the new Microsoft Edge don't work. All I get is: https://imgur.com/XYttLua I remember when I opened it when I did have access to Internet Explorer and there was a whole endless list of variables, etc., that I could browse. While that search bar, was used for... a search bar.

Anyone use this currently at all? And know how to work it?
kuertee
EGOSOFT
EGOSOFT
Posts: 818
Joined: Sun, 14. Dec 03, 13:05
x4

Re: How to get scriptproperties.html to work?

Post by kuertee »

Snowfious wrote: Fri, 18. Dec 20, 03:12Anyone use this currently at all? And know how to work it?
I think the all of the extracted files need to sit on a (local) web server.
E.g. all the XML paths in the files refer to and are accessed by the different files

I don't have any of those files "running" per se. I only have these opened in tabs in my IDE (which is Sublime) for quick searches: common.xsd, md.xsd, scriptproperties.html

My path to modding X4 (only since March this year) was:
1. downloaded Loktide's original Signal Leak Hunter mod.
2. examine its XML script structure.
3. learn XML scripting.
4. modify Loktide's SLH mod into my own SLH - Increasing Range mod by referring to the resources pinned at the top of this forum.
5. Once I got that working, and more familiar with X4's Mission Director (md), I started created my own mod.

6. I refer to the base scripts and common.xsd a lot.

7. If I want an event to trigger in my new mod, I search ... actually search ... the base X4 files for that event - if it exists or to see how it is used. E.g. regex search in folder for when the player's ship is hit is: "event.*hit"
8. Then I search for its definition in common.xsd to see what parameters the events receives and returns, etc.

9. If I need to access a property of an object, e.g. health, I'll search in scriptproperties.html to see if it exists.

10. I performed heaps for searching the files while learning - and I still do. E.g. any dev would think that "start_actor_walk" (from common.xsd) would make an npc walk, right? But, no ... to make an NPC walk, the base X4 MD files, sends a signal to the NPC with "<signal_objects object="$npc" param="'npc_move_to'" param2="$npcFloorSlot"/>".
There's no actual API doc because the MD scripts themselves described how a feature or function is used.
User avatar
Snowfious
Posts: 45
Joined: Wed, 26. Jun 19, 00:49
x4

Re: How to get scriptproperties.html to work?

Post by Snowfious »

kuertee wrote: Fri, 18. Dec 20, 05:01
Snowfious wrote: Fri, 18. Dec 20, 03:12Anyone use this currently at all? And know how to work it?
I think the all of the extracted files need to sit on a (local) web server.
E.g. all the XML paths in the files refer to and are accessed by the different files

I don't have any of those files "running" per se. I only have these opened in tabs in my IDE (which is Sublime) for quick searches: common.xsd, md.xsd, scriptproperties.html

Hmm, I see. Sounds like you don’t use the web browser method to view scriptproperites.html. Oh so are you saying that you have the folder structure open on your text editor and that’s how you navigate and such through the common and md stuff?
kuertee
EGOSOFT
EGOSOFT
Posts: 818
Joined: Sun, 14. Dec 03, 13:05
x4

Re: How to get scriptproperties.html to work?

Post by kuertee »

Snowfious wrote: Fri, 18. Dec 20, 06:38 Hmm, I see. Sounds like you don’t use the web browser method to view scriptproperites.html. Oh so are you saying that you have the folder structure open on your text editor and that’s how you navigate and such through the common and md stuff?
yup. Image
thijso
Posts: 97
Joined: Thu, 2. Jul 20, 23:24

Re: How to get scriptproperties.html to work?

Post by thijso »

I had trouble getting this working too, in firefox. The problem for me was that Firefox has become more strict in allowing things from the filesystem. I can't remember exactly what, but I needed to disable a setting in the advanced config (type 'about:config' in the address bar). I think I figured out what was wrong by looking at the console (F12 for me) when trying to load scriptproperties.html. Then googling the exact error that was shown.

Hope that helps?
User avatar
Snowfious
Posts: 45
Joined: Wed, 26. Jun 19, 00:49
x4

Re: How to get scriptproperties.html to work?

Post by Snowfious »

thijso wrote: Sun, 20. Dec 20, 10:26 I had trouble getting this working too, in firefox. The problem for me was that Firefox has become more strict in allowing things from the filesystem. I can't remember exactly what, but I needed to disable a setting in the advanced config (type 'about:config' in the address bar). I think I figured out what was wrong by looking at the console (F12 for me) when trying to load scriptproperties.html. Then googling the exact error that was shown.

Hope that helps?
Nice, thanks for this info. I looked at the console and looked online at the error. In Firefox it was the setting under about:config "privacy.file_unique_origin" to false, and the document was able to load correctly. Sweet, thank you.

Hope this info helps others on the same quest.
SirNukes
Posts: 549
Joined: Sat, 31. Mar 07, 23:44
x4

Re: How to get scriptproperties.html to work?

Post by SirNukes »

Another option, if you have python installed, is to run "python -m http.server" in cmd (preferably from the folder holding scriptproperties) to start a local html server, open "http://localhost:8000" in your browser, then path over to scriptproperties and open it. When done, close the cmd console to shut down the server. It's more steps than the firefox about:config approach, but should work in other browsers, and may be safer if you worry about that sort of thing.
jan12342203
Posts: 65
Joined: Sat, 14. May 16, 22:13
x4

Re: How to get scriptproperties.html to work?

Post by jan12342203 »

http://testingfreak.com/how-to-fix-cros ... me-and-ie/

cross origin blocks opening the file correctly in modern browsers..
just disabling that unneeded setting of thing... ^^
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13486
Joined: Sun, 15. Feb 04, 20:12
x4

Re: How to get scriptproperties.html to work?

Post by euclid »

jan12342203 wrote: Wed, 6. Jan 21, 14:44 http://testingfreak.com/how-to-fix-cros ... me-and-ie/

cross origin blocks opening the file correctly in modern browsers..
just disabling that unneeded setting of thing... ^^
Thanks jan, that actually works!

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
wwf4668
Posts: 23
Joined: Sat, 27. Mar 04, 18:48
x2

Re: How to get scriptproperties.html to work?

Post by wwf4668 »

jan12342203 wrote: Wed, 6. Jan 21, 14:44 http://testingfreak.com/how-to-fix-cros ... me-and-ie/

cross origin blocks opening the file correctly in modern browsers..
just disabling that unneeded setting of thing... ^^

Late for the party. The website mentioned does not exist. Does anybody know how to do this? Thanks
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Re: How to get scriptproperties.html to work?

Post by X2-Illuminatus »

Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Return to “X4: Foundations - Scripts and Modding”