Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Campaign script conversions #4524

Closed
wzdev-ci opened this issue Nov 9, 2016 · 22 comments
Closed

Campaign script conversions #4524

wzdev-ci opened this issue Nov 9, 2016 · 22 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Nov 9, 2016

resolution_fixed type_patch (an actual patch, not a request for one) | by Berserk Cyborg


Here is my attempt to convert campaign missions sub1-5 and sub1-5s .vlo/.slo files into javascript. Feel free to discuss these mission conversions in this ticket.

Link to branch: https://github.com/KJeff01/warzone2100/tree/campaignJS


Issue migrated from trac:4524 at 2022-04-16 12:38:04 -0700

@wzdev-ci
Copy link
Contributor Author

NoQ commented


This seems correct to me! Even though i couldn't test yet.

I don't think you need to hackAddMessage()/hackRemoveMessage() every radar blip manually, the enemy-base-handling code of libcampaign will do it for you depending on the .detectMsg property: auto-add the message when the base is detected, auto-remove when destroyed. You detect the base manually with camDetectEnemyBase().

I've been thinking that maybe we should label-ize the camSendReinforcement() entry and exit points, but i didn't do it myself, so who cares. BTW, the only point of label-izing is to make these positions/areas appear in the map editor in a fancy manner.

Something's wrong with the templates file, github highlights that every line has changed (dos/unix line endings?).

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


Did not know about camDetectEnemyBase(). I was using past converted levels as a reference when creating this one and don't remember seeing it until now.

Not sure what happened to the template file. I will fix it, but it seems to happen on occasion regardless of what I'm using.

Edit: I fixed the template file and used camDetectEnemeyBase so the base detection is more similar to that in the wzscript version.

@wzdev-ci
Copy link
Contributor Author

NoQ commented


Cool!

cam1-2.js has some examples of camDetectEnemyBase().

I still believe that this whole section can be removed, because it is handled automatically:

+//When players units spot this object, then a map blip
+//is created and plays the base detected sound
+function eventObjectSeen_ScavSouthRocketPit()
+{
+	camDetectEnemyBase("ScavSouthWestGroup");
+}
+
+function eventObjectSeen_ScavSouthGunTower()
+{
+	camDetectEnemyBase("ScavSouthEastGroup");
+}
+
+function eventObjectSeen_ScavNorthGunTower()
+{
+	camDetectEnemyBase("ScavNorthGroup");
+}

Eg. whenever any object of the group labeled ScavNorthGroup is seen by the player, the C1-5_BASE1 blip should automatically appear.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


I removed that section.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0001-Convert-cam1a-c-.vlo-.slo-into-cam1a-c.js.patch (46.2 KiB)

cam1a-c.js

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


I have cam1-7 and cam1-7s as my latest commit if anyone wants to comment on it or make a suggestion.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0001-Convert-cam1-5-s-.vlo-.slo-into-cam1-5-s-.js.patch (59.7 KiB)

cam1-5.js and cam1-5s.js

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0002-Convert-cam1a-c-.vlo-.slo-into-cam1a-c.js.patch (46.2 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0003-Convert-cam1-7-s-.vlo-.slo-to-cam1-7-s-.js.patch (52.1 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0004-Convert-cam1-1-s-.vlo-.slo-to-cam1-1-s-.js.patch (28.4 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0005-Fix-extra-win-condition.patch (1.3 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0006-Convert-cam1-d-s-.vlo-.slo-to-cam1-d-s-.js.patch (86.5 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0007-Convert-cam1end-.vlo-.slo-to-cam1end.js.patch (12.2 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0008-Bring-back-scavenger-Kevlar.patch (0.8 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


Here is my work on finishing Alpha campaign(ignore the older 1a-c patch). All levels that I recently uploaded here should work. I tested them and have not found any bugs in them. Report any bugs you may find.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


The cam1-d patch will close ticket #4476 also.

@wzdev-ci
Copy link
Contributor Author

Cyp changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Cyp changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Cyp changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Cyp commented


The campaignJS branch merged to master in 28187c24bd5ddc98b797c9f74b2f55629381ef97, thanks. Hopefully now people will test it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant