SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   Silent Hunter 5 (https://www.subsim.com/radioroom/forumdisplay.php?f=244)
-   -   UBI tool for modding SH5/SH5 Editor (https://www.subsim.com/radioroom/showthread.php?t=155879)

AVGWarhawk 09-09-09 02:16 PM

Yes sir! The creative juices can now flow into the pixel world of SH5! :yeah:

TheDarkWraith 09-09-09 02:27 PM

Quote:

Originally Posted by maerean_m (Post 1169166)
The editing of the scripts is done inside a special window, that allows the editing of the scripts while the game is running (edit & continue) with text auto-complete and jumping to function definitions, the inspection of the game variables in real time (through a property grid) and the complete description of all the exported classes (inheritance, properties, methods, events, inner types (enums, other classes)). Please note that not ALL game classes have been exported to the scripts.
Also, please note that not ALL the interface has been scripted, due to game (and time) limitations.


Time to learn Python :yep: Heading over to Borders now to see what books they have on it.
Any chance we can get some screenshots of this special window and menu editor you speak of? Just curious to see what some of these variable names and classes are.
You mention time constraints as the limiting factor for everything not being scripted. Is it possibe that we (modders) can do the scripting of the remaining items that didn't make it during development? :hmmm:

maerean_m 09-09-09 02:33 PM

1. Wikipedia is, as always, a good place to start.
2. I'll post some screenshots (but not right now, since I'm at home).
3. Sadly, no.

skwasjer 09-09-09 02:53 PM

I will not forget about .NET classes. I won't need/use forms functionality, but I surely can think of many other things I rather do in .NET than in python. Not only that, I can use a ton of existing own libraries, yeeehaaa! I got some cool idea's already just by the info you provided... all I need to know now is what the exported classes are :)

Thanks again for this awesome news :up:

[edit] I'd love a beta! :wink:

TheDarkWraith 09-09-09 03:12 PM

Quote:

Originally Posted by skwasjer (Post 1169235)
I will not forget about .NET classes. I won't need/use forms functionality, but I surely can think of many other things I rather do in .NET than in python.

If they are exporting functions, variables, etc. then they are reachable by other means other than python. Python is lightweight and easy (from what I'm seeing so far) but doesn't have the power that a full-fledged app (C++, C#) can do. This is going to get really interesting real quick. But it all depends on what variables, functions, etc. are exported. If the python script can call a library function of a program or DLL (other than the game's) then it should be possible to do all kinds of neat and interesting things. I got a ton of ideas in my head and need a BETA of the game to try them out :yep:
I wonder what version of the .NET classes we'll be able to access? Would it merely depend on the version installed on the client machine?

longam 09-09-09 03:53 PM

This is some really great news, especially with the talent in this forum.

longam 09-09-09 03:58 PM

Quote:

Originally Posted by maerean_m (Post 1169191)
Ok, forget about the .net classes (really). Players don't want Windows dialog boxes over the game while playing (in fullscreen).

Even now that I have a 22" monitor, I need to move my system and get back to the dual screen world.....hmm radar on the side....

skwasjer 09-09-09 06:01 PM

You can load any assembly or dll from python, be it custom or clr. It's built-in functionality. Python is very powerful, more than you can imagine. I just don't prefer it for many reasons, but no biggie... I'll still use it.

Best is if we can use 3.x, since we can't reliably mix FM versions.
Quote:

Originally Posted by Racerboy (Post 1169250)
If they are exporting functions, variables, etc. then they are reachable by other means other than python. Python is lightweight and easy (from what I'm seeing so far) but doesn't have the power that a full-fledged app (C++, C#) can do. This is going to get really interesting real quick. But it all depends on what variables, functions, etc. are exported. If the python script can call a library function of a program or DLL (other than the game's) then it should be possible to do all kinds of neat and interesting things. I got a ton of ideas in my head and need a BETA of the game to try them out :yep:
I wonder what version of the .NET classes we'll be able to access? Would it merely depend on the version installed on the client machine?


TheDarkWraith 09-09-09 07:57 PM

Quote:

Originally Posted by skwasjer (Post 1169331)
You can load any assembly or dll from python, be it custom or clr. It's built-in functionality. Python is very powerful, more than you can imagine. I just don't prefer it for many reasons, but no biggie... I'll still use it.

Best is if we can use 3.x, since we can't reliably mix FM versions.

That's good to know about Python. I just started reading the massive book and it will be some time before I can speak intelligently about Python.
Some things I do find interesting is that python doesn't have variable types per se. You just declare a variable and assign a value to it. Different for sure. One thing that I don't like about Python is that it's an interpreted language - like Java in some ways.
What's so much better about 3.x? The book I'm reading references 2.5 with some mentionings of 3.0 (3000 as they call it)

tater 09-10-09 12:42 AM

Quote:

Originally Posted by maerean_m (Post 1169166)
At last, but not least, the way the AI thinks has been scripted and is being stored in text files (in a custom format). So that has also been opened for modding.

Everything said is cool, but the AI innards are critical to making a really variable world. Kudos.

You're trying really hard to make me buy this, and I don't do u-boats. :hmmm:

maerean_m 09-10-09 12:43 AM

In no way would be feasible to use a interpreted language in a game. The python scripts I've created are compiled and used in a sort of virtual machine. So it's not quite assembler code, but it's not interpreted either. Still is not advisable to call python code per frame. That's why it's used in the interface and the update of the interface is done using a timer (15 times a second). If the games pulls 60 FPS, the interface will only be updated every 4th frame (but the input from the player is handled every frame).

Mikhayl 09-10-09 06:34 AM

Any insight about AI and player units? Will the "small" modders still depend on a genius to create a tool to import their creations? Or will it be possible "out of the box"?

Jaeger 09-10-09 07:43 AM

can you, marean, skwas or racerboy, please tech down the discussion? what will be possible with this window? can you give an example?

will we be able to implement external tools like mobo?:hmmm:

TheDarkWraith 09-10-09 08:39 AM

Quote:

Originally Posted by maerean_m (Post 1169447)
In no way would be feasible to use a interpreted language in a game. The python scripts I've created are compiled and used in a sort of virtual machine. So it's not quite assembler code, but it's not interpreted either. Still is not advisable to call python code per frame. That's why it's used in the interface and the update of the interface is done using a timer (15 times a second).

Thanks for the info. I was wondering about this since interpreted languages are rather slow. So the scripts you created are being used in their byte-code (compiled) form in the game or are you JIT compiling?
Is this timer (15 times/second) modifiable by the end user?

TheDarkWraith 09-10-09 08:52 AM

Quote:

Originally Posted by Jaeger (Post 1169544)
can you, marean, skwas or racerboy, please tech down the discussion? what will be possible with this window? can you give an example?

will we be able to implement external tools like mobo?:hmmm:

Purely speculative with what can be done with this window but it appears that you will be able to add sliders, buttons, progress bars, NUDs, etc. to the interface so that you can set it up how you want. Say for instance we are given the amount of HPs the sub has remaining (a variable). We can map that variable to a progress bar (think of windows installers where you see that green bar that fills up from left to right as the program is installed) so we can graphically see the life the sub has left. It might even be possible to have some event/decision making in the game via user choice. For instance: if we are given another variable that shows our level of detection (how well the enemy 'sees' us) we could say that once the level goes above (or below) a certain value execute this function (where this function is a function in the game or possibly a user created one) Once we see some screenshots of this special window, interface, and SDK we can draw better (but probably not accurate) conclusions. A script or two from the ones maerean_m created would be nice to see also :03:
what do you mean like external tools like mobo?


All times are GMT -5. The time now is 01:29 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.