SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 05-28-10, 05:32 PM   #1
ERPP8
Commodore
 
Join Date: Dec 2009
Location: My House
Posts: 608
Downloads: 161
Uploads: 0
Default How do i script?

I keep telling people that say "that's impossible to mod", "you could script it"

But:

HOW DO I SCRIPT???



PLEASE HELP!
ERPP8 is offline   Reply With Quote
Old 05-28-10, 05:45 PM   #2
SteelViking
The Old Man
 
Join Date: Mar 2010
Location: U.S.A.-East Coast
Posts: 1,587
Downloads: 86
Uploads: 4
Default

Heck yeah, I could use a lot more information on how to script.

Is there a good thread on it, or a video, etc. anywhere we should look into?
__________________

He sank 198,650 tons....who you ask?....Erich Topp, that's who!
SteelViking is offline   Reply With Quote
Old 05-28-10, 05:45 PM   #3
kylania
Silent Hunter
 
Join Date: Aug 2006
Posts: 3,528
Downloads: 118
Uploads: 0
Default

http://diveintopython.org/toc/index.html

http://wiki.python.org/moin/Beginner...NonProgrammers
__________________

kylania is offline   Reply With Quote
Old 05-28-10, 05:47 PM   #4
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

I keep asking myself that everyday. Best advice I can give is to look at the stock scripts and other peoples scripts. Pick a feature out of them you'ld like to replicate and trace that function through the script - copying the relevant parts into say notepad.
Then change all the item valuse to match your items you want to control.
Its difficult but possible - you can expect a lot of hair pulling due to countless script errors.
But stick with it and sonner or later you'll get it to work.

Have a look at my scripts in my UI - there not great scripts but they do there job in a more simplier method (Not as efficent) but they should be easier to read and see what there doing. This is because I've only figured out the basics so it takes me 50 lines of repetive stuff that 3 lines of more complex code to do.
reaper7 is offline   Reply With Quote
Old 05-28-10, 06:01 PM   #5
ERPP8
Commodore
 
Join Date: Dec 2009
Location: My House
Posts: 608
Downloads: 161
Uploads: 0
Default

Quote:
Originally Posted by reaper7 View Post
I keep asking myself that everyday. Best advice I can give is to look at the stock scripts and other peoples scripts. Pick a feature out of them you'ld like to replicate and trace that function through the script - copying the relevant parts into say notepad.
Then change all the item valuse to match your items you want to control.
Its difficult but possible - you can expect a lot of hair pulling due to countless script errors.
But stick with it and sonner or later you'll get it to work.

Have a look at my scripts in my UI - there not great scripts but they do there job in a more simplier method (Not as efficent) but they should be easier to read and see what there doing. This is because I've only figured out the basics so it takes me 50 lines of repetive stuff that 3 lines of more complex code to do.
I was wondering about more complex things though, like in a new type of sub (type 2) you would get missions closer to home because of low fuel
ERPP8 is offline   Reply With Quote
Old 05-28-10, 06:17 PM   #6
SteelViking
The Old Man
 
Join Date: Mar 2010
Location: U.S.A.-East Coast
Posts: 1,587
Downloads: 86
Uploads: 4
Default

Thanks for the advice/resources guys. I can do real simple scripting, especially if I look at other's work, but the second it gets complicated at all, I get totally confused. Funny thing is, I have really only been doing mod work for about a week and a half. I might be setting my sights too high right now.
__________________

He sank 198,650 tons....who you ask?....Erich Topp, that's who!
SteelViking is offline   Reply With Quote
Old 05-28-10, 06:34 PM   #7
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Thats the same level for me too. If only there was some resourse for SH5 regards the scripting command, wrappers and functions that can be used.
reaper7 is offline   Reply With Quote
Old 05-28-10, 06:47 PM   #8
kylania
Silent Hunter
 
Join Date: Aug 2006
Posts: 3,528
Downloads: 118
Uploads: 0
Default

Quote:
Originally Posted by reaper7 View Post
Thats the same level for me too. If only there was some resourse for SH5 regards the scripting command, wrappers and functions that can be used.
Kinda like BIS's COMREF for ArmA2.
__________________

kylania is offline   Reply With Quote
Old 05-28-10, 07:06 PM   #9
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by SteelViking View Post
Thanks for the advice/resources guys. I can do real simple scripting, especially if I look at other's work, but the second it gets complicated at all, I get totally confused. Funny thing is, I have really only been doing mod work for about a week and a half. I might be setting my sights too high right now.
Yes you are. Scripting IS programming. If you have no programming experience then you need to learn the basics first. Unfortunately there are no defined basics for SH5. But best thing you can do is get your self a beginner's guide to python. That will help a lot.

Python is much easier than C++ and C# that's for sure but it's also less powerful. Python and IronPython are great languages though for extending (scripting) a game like the devs have done with SH5.
TheDarkWraith is offline   Reply With Quote
Old 05-28-10, 06:57 PM   #10
ERPP8
Commodore
 
Join Date: Dec 2009
Location: My House
Posts: 608
Downloads: 161
Uploads: 0
Default

What I really want to know are the commands that are useful for modding
ERPP8 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:09 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.