Jump to content


Photo

Plugin: Improved/new commands and GUI shenanigans


  • Please log in to reply
20 replies to this topic

#1 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 01 May 2015 - 02:15 PM

I've been working on a plugin on the German forums for a while now, and I think it's good enough now to post it here too.

In essence it provides players with a few new commands to control their vehicles:

  • Turn warning-, blue- and headlights on and off
  • Turn siren on and off (sadly it plays only once)
  • If you send a vehicle back to the base, all personnell it spawned with will first enter the vehicle (if possible). Patients and/or criminals get put in the vehicle too. Only when all units are inside the vehicle (unless they're injured or similar) will it return to the base.
  • When a new vehicle gets ordered from the menu and a vehicle of the same type is already on the map and returning to the base, that one will get ordered instead and no new vehicle will spawn. To make sure this works as intended, vehicles returning to the base are unselectable.
  • If you hold CTRL while pressing the HQ button, all units will enter the vehicle, but it will not return to the base.

There is also a list of all units on the map available, accessible with a new button on the minimap.

I had to disable all automatisms because some don't work well with the new return to base command, to keep that in mind while playing.

 

Another new feature but useless without a custom map:

You can define parking spaces for certain vehicles (or groups of vehicles) on the map. Instead of directly despawning, a returning vehicle will first try to find a free parking space and if it finds one park there. There's a test map included in the testmod below, so take a look at that to see how exactly it works. There are also special parking spaces for hospitals or prisons to drop off "passengers" there, if necessary.

 

This plugin is inteded to be used by other mod authors for the added functionality, but the attached testmod can also be used by players to use the new commands.

The sourcecode is attached too, for people interested in that.

 

Supported Emergency 5 version: 2.0.1

Attached Files



#2 FrozenOne-94

FrozenOne-94

    Lieutenant

  • Members
  • 57 posts
  • Gender:Male
  • Location:The Netherlands

Posted 01 May 2015 - 04:10 PM

Very well done good sir;) I've been working on some plug-ins myself but couldn't get them to work because I used the original code snippets. I'll make sure to try out what you have been making so far :D


Three Hole Punch


#3 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 16 August 2015 - 05:15 PM

Updated for the new Version 1.41. No big functional changes, but the list of units became a few improvements.



#4 The Governor

The Governor

    Lieutenant

  • Members
  • 51 posts
  • Gender:Male
  • Location:US

Posted 22 August 2015 - 12:41 AM

I've been working on a plugin on the German forums for a while now, and I think it's good enough now to post it here too.

In essence it provides players with a few new commands to control their vehicles:

  • Turn warning-, blue- and headlights on and off
  • Turn siren on and off (sadly it plays only once)
  • If you send a vehicle back to the base, all personnell it spawned with will first enter the vehicle (if possible). Patients and/or criminals get put in the vehicle too. Only when all units are inside the vehicle (unless they're injured or similar) will it return to the base.
  • When a new vehicle gets ordered from the menu and a vehicle of the same type is already on the map and returning to the base, that one will get ordered instead and no new vehicle will spawn. To make sure this works as intended, vehicles returning to the base are unselectable.
  • If you hold CTRL while pressing the HQ button, all units will enter the vehicle, but it will not return to the base.

There is also a list of all units on the map available, accessible with a new button on the minimap.

I had to disable all automatisms because some don't work well with the new return to base command, to keep that in mind while playing.

 

Another new feature but useless without a custom map:

You can define parking spaces for certain vehicles (or groups of vehicles) on the map. Instead of directly despawning, a returning vehicle will first try to find a free parking space and if it finds one park there. There's a test map included in the testmod below, so take a look at that to see how exactly it works. There are also special parking spaces for hospitals or prisons to drop off "passengers" there, if necessary.

 

This plugin is inteded to be used by other mod authors for the added functionality, but the attached testmod can also be used by players to use the new commands.

The sourcecode is attached too, for people interested in that.

 

Where exactly do we put the mod?  I mean, which EM5 folder?


I see now that the circumstances of one's birth are irrelevant.

It is what you do with the gift of life that determines who you are.


#5 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 22 August 2015 - 04:50 PM

Updated the plugin, because it was crashing a bit too often.

​@Arariel: You can just drag & drop the zip file into the modifications section of the launcher



#6 The Governor

The Governor

    Lieutenant

  • Members
  • 51 posts
  • Gender:Male
  • Location:US

Posted 23 August 2015 - 11:41 AM

Updated the plugin, because it was crashing a bit too often.

​@Arariel: You can just drag & drop the zip file into the modifications section of the launcher

 

Hey there.

 

When I load up the Berlin map and request a Heavy Rescue Vehicle, the game crashes  I can only assume it's something with your mod, as I didn't have this issue beforehand.


I see now that the circumstances of one's birth are irrelevant.

It is what you do with the gift of life that determines who you are.


#7 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 23 August 2015 - 12:33 PM

Aaargh not again :( Did you use the new version I uploaded yesterday? I can't reproduce the crash sadly. It was reported before on the German forums, but I thought I fixed it. Make sure you have updated the game to version 1.4.1, too.



#8 Dyson

Dyson

    Assistant Chief

  • Members
  • 2,399 posts
  • Gender:Not Telling

Posted 23 August 2015 - 02:25 PM

Very nice ideas and smoothly put it place can't wait to try this out

#9 The Governor

The Governor

    Lieutenant

  • Members
  • 51 posts
  • Gender:Male
  • Location:US

Posted 24 August 2015 - 02:53 AM

Aaargh not again :( Did you use the new version I uploaded yesterday? I can't reproduce the crash sadly. It was reported before on the German forums, but I thought I fixed it. Make sure you have updated the game to version 1.4.1, too.

 

I downloaded the one linked in your opening post.  If that one is old, please link me to the newest version. :)  I didn't see a link in your post that said you updated it.


I see now that the circumstances of one's birth are irrelevant.

It is what you do with the gift of life that determines who you are.


#10 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 24 August 2015 - 08:12 AM

No, I always update the first post, so that's the newest version. But maybe you downloaded it before I updated? Can you post the error message?



#11 The Governor

The Governor

    Lieutenant

  • Members
  • 51 posts
  • Gender:Male
  • Location:US

Posted 24 August 2015 - 09:39 AM



No, I always update the first post, so that's the newest version. But maybe you downloaded it before I updated? Can you post the error message?

 

Just to make sure, I went back and downloaded your mod again, and it was working for a while until I tried to send back several police cars.  I got two sent back, but when I sent the third, it crashed.

 

RQM0vZW.png

 

and I downloaded the full thing for you.

Attached Files


I see now that the circumstances of one's birth are irrelevant.

It is what you do with the gift of life that determines who you are.


#12 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 24 August 2015 - 10:51 AM

Thanks for the detailed information. It's a veeery strange crash and I can't reproduce the same one, though I just fixed a crash when sending back vehicles. Was the police car transporting a criminal?



#13 The Governor

The Governor

    Lieutenant

  • Members
  • 51 posts
  • Gender:Male
  • Location:US

Posted 25 August 2015 - 12:32 AM

Thanks for the detailed information. It's a veeery strange crash and I can't reproduce the same one, though I just fixed a crash when sending back vehicles. Was the police car transporting a criminal?

 

You're welcome. :)   Yes it was.


I see now that the circumstances of one's birth are irrelevant.

It is what you do with the gift of life that determines who you are.


#14 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 25 August 2015 - 12:16 PM

Okay, I uploaded a new version. Now it ​really shouldn't crash anymore.



#15 Walker282

Walker282

    Lieutenant

  • Members
  • 67 posts
  • Gender:Male

Posted 26 August 2015 - 04:10 AM

still crashes for me right when i start up a free play game... Cant figure out why..



#16 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 26 August 2015 - 10:32 AM

I can't reproduce it. Every freeplay map loads fine for me. Can you attach the crash information like Arariel did above?



#17 Walker282

Walker282

    Lieutenant

  • Members
  • 67 posts
  • Gender:Male

Posted 28 August 2015 - 03:04 AM

I'm not going to worry much about it right now until there is more support for mods on EM5.. Great look to the mod though.... I would be interested in attempting to mod stuff if I was able to find out where to start... Been playing around and can't figure it out... If you have any insight on where to begin let me know haha.



#18 Ben12

Ben12

    Lieutenant

  • Members
  • 56 posts
  • Gender:Male

Posted 05 January 2016 - 12:17 AM

Nice, from what I see. Do you think I could use this as part of the Dutch mod, which I'm taking over soon?



#19 Dartlak

Dartlak

    Firefighter

  • Members
  • 14 posts
  • Gender:Male

Posted 05 January 2016 - 08:56 AM

​Sure, go ahead.



#20 RangerDog

RangerDog

    Senior Captain

  • Members
  • 413 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Nothing :(((

Posted 05 January 2016 - 09:14 AM

Nice, from what I see. Do you think I could use this as part of the Dutch mod, which I'm taking over soon?

 

To do that you know you need permission right?

And i dont think you have it since his last online:

 Last Active Nov 29 2015 07:54 PM

 
Way before you started talking about this mod ;)

<p>How about being dead?