Author Topic: *Scripting Thread*  (Read 88105 times)

0 Members and 1 Guest are viewing this topic.

Offline hunter491

  • First Sergeant
  • *
  • Posts: 188
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #75 on: April 15, 2015, 08:37:28 pm »
I think I saw some scripts to display information messages but I can't remember where. If someone could help me that would be nice, I need those for Commander_Battle.

module_scripts.py
Code
			 (multiplayer_send_string_to_player, ":player_no", multiplayer_event_show_server_message, "str_intro_msg"),

module_strings.py
Code
("intro_msg","This is an example message that will be displayed to the player when joining the server!"),

Hope this was of any help to you :)

Hey sorry im puzzled where should i place the message i wanna convey to player and how many strings i can make?

Offline cedric1709

  • Second Lieutenant
  • *
  • Posts: 55
    • View Profile
  • Nick: Cedric
  • Side: Neutral
Re: *Scripting Thread*
« Reply #76 on: April 27, 2015, 11:47:21 pm »
Hi,

A couple of my regiment's members were thinking of making a fun mini-mod for theb reg to play after events, with small changes to skins, weapon attributes, etc.
I made a couple of Conquest maps with an AI Mesh for this, but I was know wondering how and if you could only choose a specific troop class from each nation to spawn when you increased the bot count. Currently, as you know, bots spawned in will be of a random class, from both inf, cav, and special troop classes.

My question is whether there is a script for this (I'm thinking of something similar to the 15th's HvB server), so that we can choose which troop classes bots have for PvE.

Thanks

Been trying to figure this out for some time now aswell, would anyone like to help out with this? Because it's really hard to find in the server source code

Offline NickyJ

  • Major General
  • **
  • Posts: 3560
  • The Twilight Zone
    • View Profile
  • Nick: LIR_Lieut_NickyJ
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #77 on: May 04, 2015, 11:50:09 pm »
Question: I've heard of server mods being able to make people spawn with different weapons, for example a spontoon instead of a flag or sword for color bearers. With that in mind, is it technically possible to completely remake a class with just a server-side script? Like change French sailors into a skirmisher class, with a normal uniform and rifles instead of random weapons. Making a different module might be more effective, but I was thinking of something that could be geared towards hosting linebattles with it so that people don't have to download a different module just for that one battle. I know next to nothing about scripting, so this question is pretty much just a shot in the dark. :-\

Offline Commissar Jdf

  • General
  • ****
  • Posts: 3076
    • View Profile
  • Nick: USMC_Maj_CommissarJdf
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #78 on: May 09, 2015, 05:25:19 am »
Hi guys!

I've seen a lot of servers nowadays that have custom messages appear saying things like "<regiment name> is recruiting," or more commonly on Native things like "Welcome to our server <player name>." The first shows up on the top-middle-most part of the screen in pink-bold text, much like the admin chat, and the latter appears down at the bottom left in small reddish-pink text.

My question is how would I do both of these? I know it would go in module_scripts.py.

Thanks bunches.


I FIGURED OUT HOW TO DO THIS MYSELF :)
« Last Edit: May 12, 2015, 07:04:57 pm by Commissar Jdf »

Offline Commissar Jdf

  • General
  • ****
  • Posts: 3076
    • View Profile
  • Nick: USMC_Maj_CommissarJdf
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #79 on: May 12, 2015, 07:09:25 pm »
Now that I know how to make a basic message appear when someone joins the server, how exactly would you make a timed admin message appear (i.e every 10 minutes "Don't forget to add this server to your favorites!" appears.)?

Starting extremely simply, maybe I could try this in module_scripts.py?
Code
(multiplayer_send_string to player, ":player_no", multiplayer_event_send_admin_chat, "str_admin_msg"),

Offline Gurkha

  • Lieutenant General
  • ***
  • Posts: 2650
  • Former 33rd LtCol
    • View Profile
    • Official 33rd Regiment of Foot Website
  • Nick: Gurkha
  • Side: Union
Re: *Scripting Thread*
« Reply #80 on: August 29, 2015, 03:52:46 pm »
Is it possible to merge conquest and siege into one game mode?

Offline Gokiller

  • Almost Pride of Ni
  • Major General
  • **
  • Posts: 3913
  • Bydand in the chat lads!
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #81 on: September 01, 2015, 03:46:49 pm »
Now that I know how to make a basic message appear when someone joins the server, how exactly would you make a timed admin message appear (i.e every 10 minutes "Don't forget to add this server to your favorites!" appears.)?

Starting extremely simply, maybe I could try this in module_scripts.py?
Code
(multiplayer_send_string to player, ":player_no", multiplayer_event_send_admin_chat, "str_admin_msg"),
Taken from Saxingers OSP scripts. Haven't tried it myself, but I guess it should work.

Quote from: mission_template
automatic_server_announcement = (
    1, 0, 0, [(multiplayer_is_server),],
   [                 
                  (val_add,"$counter",1),
            (try_begin),
                  (eq, "$counter", 300),
                  (store_random_in_range,":message",1,1),
            (try_begin),
                  (eq,":message",1),
                  (str_store_string, s0, "str_server_message_1"),
            (try_end),
                  (call_script, "script_cf_server_message_syn"),
                  (assign, "$counter", 0),
    (try_end),
  ])

Quote from: Strings
("server_message_1", "Type you first Serveranouncement"),

For the time just adjust this bit:
Quote
(eq, "$counter", 300), 
300 = 5 mins, so in your case 10 mins would be 600.

Offline hunter491

  • First Sergeant
  • *
  • Posts: 188
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #82 on: September 16, 2015, 03:37:53 pm »
Hey I ve read all posts in this thread and still cant work out how to make  msg when a player shows up at the server?
Could anyone be so kind and help me out, step by step?
Thanks a million.

Offline hunter491

  • First Sergeant
  • *
  • Posts: 188
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #83 on: September 19, 2015, 10:37:53 am »
Anyone?

Offline hunter491

  • First Sergeant
  • *
  • Posts: 188
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #84 on: September 22, 2015, 09:23:39 pm »
lol guys, pls just a little help -.-

Offline Ted

  • Colonel
  • *
  • Posts: 4478
  • Aufknöpfen!
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #85 on: September 23, 2015, 06:46:11 am »
lol guys, pls just a little help -.-

Nope
Dat kid who put up a global banlist back in Betty's times.
Former Regiments: 7te Kurmarkische Landwehr, 6te Ulanen, kk Kürassierregiment Nr.4, kk Bombardier-Regiment Nr.3, kk AR Nr.2, GGR Nr.4, Artillerie im Kö.Preuß.IR Nr.33.
>>Scenes<<

Offline Lilja Mariasdóttir

  • Colonel
  • *
  • Posts: 2015
  • Ist ein Schaf in einer Tasse
    • View Profile
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #86 on: September 24, 2015, 08:15:26 pm »
For the message for joining players, this might help you: https://www.fsegames.eu/forum/index.php?topic=26609.0

Nope
Dear annoying troll, if you dont have anything to contribute to a theme, or thread, how about not posting nonsense? (meant to all your trolls and spams, not only here)
Seehofer schafft das Heer ab.

Offline hunter491

  • First Sergeant
  • *
  • Posts: 188
    • View Profile
  • Side: Neutral
Re: *Scripting Thread*
« Reply #87 on: September 24, 2015, 09:30:01 pm »
Oh that its so educative and helpful, thanks a million :)

Offline Siwi

  • Donator
  • *
  • Posts: 2055
  • Where is BCoF
    • View Profile
  • Nick: -|- Where is BCoF -|-
  • Side: Confederacy
Re: *Scripting Thread*
« Reply #88 on: December 08, 2015, 12:13:43 am »
Would a script that allowed someone to poll to move to the next map in rotation be possible? I feel like it would, but I'm not sure
Quote from: George W. Bush on 9/11
Battle Cry of Freedom was an inside job
NW Leaderboards
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
NA_Groupfighting
 
Check out the site
 
_________________

Offline Clashinnit

  • Volunteer
  • *
  • Posts: 11
    • View Profile
Re: *Scripting Thread*
« Reply #89 on: January 17, 2016, 11:49:51 pm »
Hi!

My regiment has recently got it's own server and I was thinking about ways to help with training. I was hoping someone could help me with how to create a script to force one team to be only one regiment selection.

I basically want it so that I can have players on Team 1 and bots on Team 2 which can be forced to all be Partisans for general practice or cavalry for anti-cavalry practice.

Any help would be great, I have no experience with scripting!

Cheers

Clash