Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magiclysm: summon vehicle spell : floating disk #37991

Merged
merged 12 commits into from Apr 6, 2020
Merged

Magiclysm: summon vehicle spell : floating disk #37991

merged 12 commits into from Apr 6, 2020

Conversation

ghost
Copy link

@ghost ghost commented Feb 13, 2020

Summary

SUMMARY: Content "Magiclysm: summon vehicle spell : floating disk"

Purpose of change

Adds a technomancer spell to summon a floating disk to carry cargo.
any spell can now be defined with a vproto_id string, this spell type is summon_vehicle, and it will summon the defined vehicle, for the defined amount of time, after which it will dissappear.
Magic vehicles are not interactable, so they cant be refuelled / repaired etc.

( I plan to add a magic carpet type thing after this, by which point it may be that ill need to add handling for how to interact with the vehicle refill it with 'mana' fuel etc - that can come later, this is just the proof of concept of summoning a vehicle )

Describe the solution

New spell effect, new vehicle type - floating disk, add summon effect, spawn vehicle, mark it as magic, give it a summon timer, as per the summon monster spells.

Open the (C)hat menu to order it to follow you around, or you can drag it.

Describe alternatives you've considered

N/A

Testing

cast the spell, summoned the vehicle, ordered it to follow me, placed items in it, walked around, it followed, when the spell ran out, the vehicle was destroyed, and the items inside it fell out.

Additional context

The JSON stuff - the spell stats, the descriptions, the levels, everything are just placeholders right now, just to showcase the feature @KorGgenT I'm sure will show me how they want it, I have no idea how to balance it for that.

@ghost ghost requested a review from KorGgenT as a code owner February 13, 2020 10:41
@ghost ghost added 0.E Content Freeze <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mods: Magiclysm Anything to do with the Magiclysm mod Vehicles Vehicles, parts, mechanics & interactions labels Feb 13, 2020
src/magic.h Show resolved Hide resolved
src/map.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
Copy link
Member

@KorGgenT KorGgenT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! i've been wanting this feature for a long time. I haven't loaded it up yet, so here's just the stuff i noticed while reading through the code.

src/magic.h Show resolved Hide resolved
data/mods/Magiclysm/Spells/technomancer.json Outdated Show resolved Hide resolved
data/mods/Magiclysm/Spells/technomancer.json Outdated Show resolved Hide resolved
src/magic_spell_effect.cpp Outdated Show resolved Hide resolved
src/npctalk.cpp Outdated Show resolved Hide resolved
src/npctalk.cpp Outdated Show resolved Hide resolved
src/npctalk.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Show resolved Hide resolved
@BevapDin
Copy link
Contributor

What happens to vehicle parts that the player installs manually to the magic vehicle? What happens if the player removes part from the magic vehicle (do they despawn)? What happens to parts that are broken of from the vehicle?

@ghost
Copy link
Author

ghost commented Feb 13, 2020

What happens to vehicle parts that the player installs manually to the magic vehicle? What happens if the player removes part from the magic vehicle (do they despawn)? What happens to parts that are broken of from the vehicle?

They can't interact with the vehicle, when it is a magic vehicle, they dont get a chance to open the interaction menu to remove or install parts.

The parts themselves do not breaks_into anything, so nothing woul dbe dropped, if they were damaged, they would just dissappear.

@KorGgenT
Copy link
Member

just thought of this: the spell needs a scroll, and to be put into an item group. i'm thinking the tier 2 spell scroll itemgroup should be good.

src/npctalk.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
src/vehicle.cpp Outdated Show resolved Hide resolved
@BevapDin
Copy link
Contributor

They can't interact with the vehicle, when it is a magic vehicle, they dont get a chance to open the interaction menu to remove or install parts.

The parts themselves do not breaks_into anything, so nothing woul dbe dropped, if they were damaged, they would just dissappear.

This might be true for your example vehicle, but it's not true in the general case. I can change the "effect_str": "4x4_car" and now I'll get a regular vehicle with non-magical parts.

@ghost
Copy link
Author

ghost commented Feb 14, 2020

They can't interact with the vehicle, when it is a magic vehicle, they dont get a chance to open the interaction menu to remove or install parts.

The parts themselves do not breaks_into anything, so nothing woul dbe dropped, if they were damaged, they would just dissappear.

This might be true for your example vehicle, but it's not true in the general case. I can change the "effect_str": "4x4_car" and now I'll get a regular vehicle with non-magical parts.

The magic flag is added when the vehicle is summoned, no matter what the vehicle is.

in the spell function.

EDIT: ah, yeah it wont be interactable, thta checks the vehicle-wide magic flag, but its parts could still drop bits and pieces, cos the parts themselves arent magical.

Hmm ill add a check for if( vehicle->magic ) before dropping parts

@ghost
Copy link
Author

ghost commented Feb 17, 2020

Added check for if vehicle is magic - then dont allow parts to be broken off or deposit anything on the ground.

And added scroll for the spell, and added it to item groups.

@ghost ghost requested review from I-am-Erk and John-Candlebury as code owners March 6, 2020 19:18
@ghost ghost changed the base branch from master to dev March 6, 2020 19:18
@ZhilkinSerg ZhilkinSerg force-pushed the dev branch 3 times, most recently from ad63e77 to 8e68539 Compare April 1, 2020 12:18
@kevingranade kevingranade force-pushed the dev branch 4 times, most recently from 621a68e to b7106d0 Compare April 2, 2020 07:42
@ZhilkinSerg ZhilkinSerg force-pushed the dev branch 3 times, most recently from 0f30a43 to d432807 Compare April 2, 2020 12:55
@ZhilkinSerg ZhilkinSerg changed the base branch from dev to master April 2, 2020 14:31
@ghost ghost changed the title [WIP]Magiclysm: summon vehicle spell : floating disk Magiclysm: summon vehicle spell : floating disk Apr 3, 2020
@ghost
Copy link
Author

ghost commented Apr 3, 2020

Rebased, cleaned up, retested, working.

@KorGgenT
Copy link
Member

KorGgenT commented Apr 5, 2020

The json and magiclysm vehicle looks good.

@ZhilkinSerg ZhilkinSerg merged commit d36e92d into CleverRaven:master Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing [JSON] Changes (can be) made in JSON Mods: Magiclysm Anything to do with the Magiclysm mod Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants